Instrument-based distributed computing systems

ABSTRACT

An instrument-based distributed computing system is disclosed that accelerates the measurement, analysis, verification and validation of data in a distributed computing environment. A large computing work can be performed in a distributed fashion using the instrument-based distributed system. The instrument-based distributed system may include a client that creates a job. The job may include one or more tasks. The client may distribute a portion of the job to one or more remote workers on a network. The client may reside in an instrument. One or more workers may also reside in instruments. The workers execute the received portion of the job and may return execution results to the client. As such, the present invention allows the use of instrument-based distributed system on a network to conduct the job and facilitate decreasing the time for executing the job.

RELATED APPLICATION

This application is a continuation of a pending United States patentapplication entitled “INSTRUMENT BASED DISTRIBUTED COMPUTING SYSTEMS”,U.S. patent application Ser. No. 11/301061, filed on Dec. 12, 2005.

TECHNICAL FIELD

The present invention generally relates to a distributed computingenvironment and more particularly to methods, systems and mediums forproviding an instrument-based distributed computing system thataccelerates the measurement, analysis, verification and validation ofdata in the distributed computing environment.

BACKGROUND INFORMATION

MATLAB® is a product of The MathWorks, Inc. of Natick, Mass., whichprovides engineers, scientists, mathematicians, and educators across adiverse range of industries with an environment for technical computingapplications. MATLAB® is an intuitive high performance language andtechnical computing environment that provides mathematical and graphicaltools for mathematical computation, data analysis, visualization andalgorithm development. MATLAB® integrates numerical analysis, matrixcomputation, signal processing, and graphics in an easy-to-useenvironment where problems and solutions are expressed in familiarmathematical notation, without traditional programming. MATLAB® is usedto solve complex engineering and scientific problems by developingmathematical models that simulate the problem. A model is prototyped,tested and analyzed by running the model under multiple boundaryconditions, data parameters, or just a number of initial guesses. InMATLAB®, one can easily modify the model, plot a new variable orreformulate the problem in a rapid interactive fashion that is typicallynot feasible in a non-interpreted programming such as Fortran or C.

As a desktop application, MATLAB® allows scientists and engineers tointeractively perform complex analysis and modeling in their familiarworkstation environment. With many engineering and scientific problemsrequiring larger and more complex modeling, computations accordinglybecome more resource intensive and time-consuming. However, a singleworkstation can be limiting to the size of the problem that can besolved, because of the relationship of the computing power of theworkstation to the computing power necessary to execute computingintensive iterative processing of complex problems in a reasonable time.For example, a simulation of a large complex aircraft model may take areasonable time to run with a single computation with a specified set ofparameters. However, the analysis of the problem may also require themodel be computed multiple times with a different set of parameters,e.g., at one-hundred different altitude levels and fifty differentaircraft weights, to understand the behavior of the model under variedconditions. This would require five-thousand computations to analyze theproblem as desired and the single computer would take an unreasonable orundesirable amount of time to perform these simulations. Therefore, itis desirable to perform a computation in a distributed manner when thecomputation becomes so large and complex that it cannot be completed ina reasonable amount of time on a single computer. In particular, sincesome instruments are provided on a PC-based platform and have capacitiesto run additional software, it is also desirable to use the instrumentsfor performing a large computation in a distributed manner.

SUMMARY OF THE INVENTION

The present invention provides an instrument-based distributed computingsystem that accelerates the measurement, analysis, verification andvalidation of data in a distributed computing environment. In thepresent invention, a large computational job can be performed in adistributed fashion using the instrument-based distributed system. Theinstrument-based distributed system may include a client that creates ajob. The job may include one or more tasks. The client may distribute aportion of the job to one or more remote workers for the distributedexecution of the job. The client may reside in an instrument. Theworkers may also reside in instruments. The workers execute the receivedportion of the job and may return execution results to the client. Assuch, the present invention allows the use of instrument-baseddistributed system on a network to conduct the job and facilitatedecreasing the time for executing the job.

In one aspect of the present invention, a method is provided forexecuting a job in a distributed fashion. The method includes the stepof installing a computing client for providing a computing environmentin an instrument. The method also includes the step of enabling theclient to generate a job in the computing environment, wherein the jobincludes one or more tasks. The method further includes the step ofdistributing the job to remote computing workers for the distributedexecution of the job.

In another aspect of the present invention, a method is provided forexecuting a job in a distributed fashion. The method includes the stepof installing a computing worker for providing a computing environmentin the instrument. The method also includes the step of receiving aportion of a job generated by a remote client, wherein the job includesone or more tasks. The method further includes the steps of enabling thecomputing worker to execute the received portion of the job, andreturning execution result to the remote client.

In another aspect of the present invention, a system is provided forexecuting a job in a distributed fashion in a computing environment. Thesystem includes a first instrument for generating a job, wherein the jobincludes one or more tasks. The system also includes a second instrumentfor receiving a portion of the job and executing the received portion ofthe job to obtain execution results, wherein the second instrumentreturns the execution results to the first instrument.

In another aspect of the present invention, a medium holdinginstructions executable in an instrument is provided for a method ofexecuting a job in a distributed fashion. The method includes the stepof installing a computing client for providing a computing environmentin the instrument. The method also includes the step of enabling theclient to generate a job in the computing environment, wherein the jobincludes one or more tasks. The method further includes the step ofdistributing the job to remote computing workers for the distributedexecution of the job.

In another aspect of the present invention, a medium holdinginstructions executable in an instrument is provided for a method ofexecuting a job in a distributed fashion. The method includes the stepof installing a computing worker for providing a computing environmentin the instrument. The method also includes the step of receiving aportion of a job generated by a remote client, wherein the job includesone or more tasks. The method further includes the steps of enabling thecomputing worker to execute the received portion of the job, andreturning execution result to the remote client.

The details of various embodiments of the invention are set forth in theaccompanying drawings and the description below. Other features andadvantages of the invention will become apparent from the description,the drawings and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other objects, aspects, features, and advantages ofthe invention will become more apparent and may be better understood byreferring to the following description taken in conjunction with theaccompanying drawings, in which:

FIG. 1A is a block diagram of a computing device for practicing anembodiment of the present invention;

FIG. 1B is a block diagram of a distributed computing system forpracticing an illustrative embodiment of the present invention;

FIG. 2A is a block diagram of the components of an embodiment of thepresent invention in a two-node networked computer system;

FIG. 2B is a block diagram of the components of an alternativeembodiment of the present invention in a multi-tier networked computersystem;

FIG. 2C is a block diagram of the components of an exemplary embodimentof the present invention in a distributed network computer system.

FIG. 3A is a block diagram of the direct distribution mode of operationof the present invention;

FIG. 3B is a block diagram of the automatic distribution mode ofoperation of the present invention;

FIG. 3C is a block diagram of the batch automatic distribution mode ofoperation of the present invention;

FIG. 3D is a block diagram of an exemplary embodiment of the batchautomatic distribution mode of operation of the present invention;

FIG. 4 is a block diagram illustrating a multiple mode of operationembodiment of the present invention;

FIG. 5A is a flow diagram of steps performed in an embodiment of FIG.3A;

FIG. 5B is a flow diagram of steps performed in an embodiment of FIG.3B;

FIG. 5C and FIG. 5D are flow diagrams of steps performed in a batch modeof operations of the present invention;

FIG. 6A is a block diagram depicting the details of the automatic taskdistribution mechanism;

FIG. 6B is a block diagram depicting the details of the automatic taskdistribution mechanism with a job manager;

FIG. 6C is a block diagram depicting the details of a job managercomprising the automatic task distribution mechanism;

FIG. 7 is a block diagram depicting an exemplary embodiment of theinvention using service processes;

FIG. 8A is a block diagram illustrating the use of objects for userinteraction with the distributed system;

FIG. 8B is a block diagram illustrating the use of objects for userinteraction with an exemplary embodiment of the distributed system;

FIG. 9A is a block diagram illustrating an operation of the presentinvention for distributed and streaming technical computing;

FIG. 9B is a block diagram illustrating an operation of the presentinvention for parallel technical computing;

FIG. 10 is a block diagram showing an exemplary distributed system inthe illustrative embodiment of the present invention;

FIG. 11 is a block diagram showing an exemplary instrument depicted inFIG. 10;

FIGS. 12A-12C are block diagrams showing other exemplary distributedsystems in the illustrative embodiment of the present invention;

FIG. 13 is a block diagram showing an exemplary test environment in theillustrative embodiment of the present invention;

FIG. 14 a flow chart of steps performed in the distributed test systemin FIG. 13; and

FIG. 15 is a flow chart showing an exemplary operation for providing adistributed array in the illustrative embodiment of the presentinvention.

DETAILED DESCRIPTION

Certain embodiments of the present invention are described below. It is,however, expressly noted that the present invention is not limited tothese embodiments, but rather the intention is that additions andmodifications to what is expressly described herein also are includedwithin the scope of the invention. Moreover, it is to be understood thatthe features of the various embodiments described herein are notmutually exclusive and can exist in various combinations andpermutations, even if such combinations or permutations are not madeexpress herein, without departing from the spirit and scope of theinvention.

The illustrative embodiment of the present invention provides adistributed computing environment that enables a user to execute a jobin a distributed fashion. In particular, the illustrative embodiment ofthe present invention provides an instrument-based distributed computingsystem that uses the one or more instruments for the distributedexecution of the job. The instrument-based distributed computing systemmay include a client for creating the job. The client may distribute aportion of the job to one or more remote workers for the distributedexecution of the job. The client may reside in an instrument. Theworkers may also reside in instruments. The remote workers execute aportion of the job and return the execution results to the client. Theinstruments running the workers may have the capability to acceleratethe execution of the job. For example, the instrument may includehardware components, such as FPGA, ASIC, DSP and CPU, to perform fastcalculations, such as FFT calculations. As such, the illustrativeembodiment of the present invention executes the job in a distributedfashion using the instrument-based distributed computing system. Theillustrative embodiment of the present invention utilizes a technicalcomputing client and a technical computing worker for the distributedexecution of the job, which will be described below in more detail.

A. Technical Computing Client and Technical Computing Worker

The illustrative embodiment of the present invention provides for thedynamic distribution of technical computing tasks from a technicalcomputing client to remote technical computing workers for execution ofthe tasks on multiple computers systems. Tasks can be declared on atechnical computing client and additionally organized into jobs. A jobis a logical unit of activities, or tasks that are processed and/ormanaged collectively. A task defines a technical computing command, suchas a MATLAB® command, to be executed, and the number of arguments andany input data to the arguments. A job is a group of one or more tasks.The task can be directly distributed by the technical computing clientto one or more technical computing workers. A technical computing workerperforms technical computing on a task and may return a result to thetechnical computing client.

Additionally, a task or a group of tasks, in a job, can be submitted toan automatic task distribution mechanism to distribute the one or moretasks automatically to one or more technical computing workers providingtechnical computing services. The technical computing client does notneed to specify or have knowledge of the technical computing workers inorder for the task to be distributed to and computed by a technicalcomputing worker. The automatic task distribution mechanism candistribute tasks to technical computing workers that are anonymous toany technical computing clients. The technical computing workers performthe task and may return as a result the output data generated from theexecution of the task. The result may be returned to the automatic taskdistribution mechanism, which, in turn, may provide the result to thetechnical computing client.

Furthermore, the illustrative embodiment provides for an object-orientedinterface in a technical computing environment to dynamically distributetasks or jobs directly or indirectly, via the automatic taskdistribution mechanism, to one or more technical computing workers. Theobject-oriented interface provides a programming interface for atechnical computing client to distribute tasks for processing bytechnical computer workers.

The illustrative embodiment will be described solely for illustrativepurposes relative to a MATLAB®-based distributed technical computingenvironment. Although the illustrative embodiment will be describedrelative to a MATLAB®-based application, one of ordinary skill in theart will appreciate that the present invention may be applied todistributing the processing of technical computing tasks with othertechnical computing environments, such as technical computingenvironments using software products of LabVIEW® or MATRIXx fromNational Instruments, Inc., or Mathematica® from Wolfram Research, Inc.,or Mathcad of Mathsoft Engineering & Education Inc., or Maple™ fromMaplesoft, a division of Waterloo Maple Inc.

The illustrative embodiment of the present invention provides forconducting a test in a distributed fashion tasks from a technicalcomputing client to remote technical computing workers for execution ofthe tasks on multiple computers systems. Tasks can be declared on atechnical computing client and additionally organized into jobs. A jobis a logical unit of activities, or tasks that are processed and/ormanaged collectively. A task defines a technical computing command, suchas a MATLAB® command, to be executed, and the number of arguments andany input data to the arguments. A job is a group of one or more tasks.The task can be directly distributed by the technical computing clientto one or more technical computing workers. A technical computing workerperforms technical computing on a task and may return a result to thetechnical computing client.

Additionally, a task or a group of tasks, in a job, can be submitted toan automatic task distribution mechanism to distribute the one or moretasks automatically to one or more technical computing workers providingtechnical computing services. The technical computing client does notneed to specify or have knowledge of the technical computing workers inorder for the task to be distributed to and computed by a technicalcomputing worker. The automatic task distribution mechanism candistribute tasks to technical computing workers that are anonymous toany technical computing clients. The technical computing workers performthe task and may return as a result the output data generated from theexecution of the task. The result may be returned to the automatic taskdistribution mechanism, which, in turn, may provide the result to thetechnical computing client.

Furthermore, the illustrative embodiment provides for an object-orientedinterface in a technical computing environment to dynamically distributetasks or jobs directly or indirectly, via the automatic taskdistribution mechanism, to one or more technical computing workers. Theobject-oriented interface provides a programming interface for atechnical computing client to distribute tasks for processing bytechnical computer workers.

FIG. 1A depicts an environment suitable for practicing an illustrativeembodiment of the present invention. The environment includes acomputing device 102 having memory 106, on which software according toone embodiment of the present invention may be stored, a processor (CPU)104 for executing software stored in the memory 106, and other programsfor controlling system hardware. The memory 106 may comprise a computersystem memory or random access memory such as DRAM, SRAM, EDO RAM, etc.The memory 106 may comprise other types of memory as well, orcombinations thereof. A human user may interact with the computingdevice 102 through a visual display device 114 such as a computermonitor, which may include a graphical user interface (GUI). Thecomputing device 102 may include other I/O devices such a keyboard 110and a pointing device 112, for example a mouse, for receiving input froma user. Optionally, the keyboard 110 and the pointing device 112 may beconnected to the visual display device 114. The computing device 102 mayinclude other suitable conventional I/O peripherals. The computingdevice 102 may support any suitable installation medium 116, a CD-ROM,floppy disks, tape device, USB device, hard-drive or any other devicesuitable for installing software programs, such as the MATLAB®-baseddistributed computing application 120. The computing device 102 mayfurther comprise a storage device 108, such as a hard-drive or CD-ROM,for storing an operating system and other related software, and forstoring application software programs, such as the MATLAB®-baseddistributed computing application 120 of an embodiment of the presentinvention. Additionally, the operating system and the MATLAB®-baseddistributed computing application 120 of the present invention can berun from a bootable CD, such as, for example, KNOPPIX®, a bootable CDfor GNU/Linux.

Additionally, the computing device 102 may include a network interface118 to interface to a Local Area Network (LAN), Wide Area Network (WAN)or the Internet through a variety of connections including, but notlimited to, standard telephone lines, LAN or WAN links (e.g., 802.11,T1, T3, 56 kb, X.25), broadband connections (e.g., ISDN, Frame Relay,ATM), wireless connections, or some combination of any or all of theabove. The network interface 118 may comprise a built-in networkadapter, network interface card, PCMCIA network card, card bus networkadapter, wireless network adapter, USB network adapter, modem or anyother device suitable for interfacing the computing device 118 to anytype of network capable of communication and performing the operationsdescribed herein. Moreover, the computing device 102 may be any computersystem such as a workstation, desktop computer, server, laptop, handheldcomputer or other form of computing or telecommunications device that iscapable of communication and that has sufficient processor power andmemory capacity to perform the operations described herein.

FIG. 1A depicts the MATLAB®-based distributed computing application 120of an embodiment of the present invention running in a stand-alonesystem configuration of a single computing device 102. FIG. 1B depictsanother environment suitable for practicing an illustrative embodimentof the present invention, where functionality of the MATLAB®-baseddistributed computing application 120 is distributed across multiplecomputing devices (102′, 102″ and 102′″). In a broad overview, thesystem 100 depicts a multiple-tier or n-tier networked computer systemfor performing distributed software applications such as the distributedtechnical computing environment of the present invention. The system 100includes a client 150 (e.g., a first computing device 102′) incommunications through a network communication channel 130 with a servercomputer 160, also known as a server, (e.g., a second computing device102″) over a network 140 and the server in communications through anetwork communications channel 130 with a workstation (e.g., a thirdcomputing device 102′″) over the network 140′. The client 150, theserver 160, and the workstation 170 can be connected 130 to the networks140 and/or 140′ through a variety of connections including, but notlimited to, standard telephone lines, LAN or WAN links (e.g., 802.11,T1, T3, 56 kb, X.25), broadband connections (e.g., ISDN, Frame Relay,ATM), wireless connections, or some combination of any or all of theabove. Each of the client 150, server 160 and workstation 170 can be anytype of computing device (102′, 102″ and 102′″) as described above andrespectively configured to be capable of computing and communicating theoperations described herein.

In one embodiment, each of the client 150, server 160 and workstation170 are configured to and capable of running at least a portion of thepresent invention of the MATLAB®-based distributed computing application120. As a distributed software application, the MATLAB®-baseddistributed computing application has one or more software componentsthat run on each of the client 150, server 160 and workstation 170,respectively, and work in communication and in collaboration with eachother to meet the functionality of the overall application. For example,the client 150 may hold a graphical modeling environment that is capableof specifying block diagram models and technical computing tasks toanalyze the model. The client 150 may have software componentsconfigured to and capable of submitting the tasks to the server 160. Theserver 160 may have software components configured to and capable ofreceiving the tasks submitted by the client 150 and for determining aworkstation 170 to assign the task for technical computing. Theworkstation 170 may hold software components capable of providing atechnical computing environment to perform technical computing of thetasks assigned from the server 160 and submitted by the client 150. Insummary, the technical computing environment and software components ofthe MATLAB®-based distributed computing application 120 may be deployedacross one or more different computing devices in various networktopologies and configurations.

FIG. 2A depicts an illustrative embodiment of the components of theMATLAB®-based distributed computing application 120. In brief overview,the system 200 of the MATLAB®-based distributed computing application120 is a two-node distributed system comprising a technical computingclient application 250, or technical computing client, running on aclient 150 computer and a technical computing worker application 270, ortechnical computing worker, running on a workstation 170. The technicalcomputing client 250 is in communications with the technical computingworker 270 through a network communications channel 130 over a network140.

The technical computing client 250 can be a technical computing softwareapplication that provides a technical computing and graphical modelingenvironment for generating block diagram models and to definemathematical algorithms for simulating models. The technical computingclient 250 can be a MATLAB®-based client, which may include all or aportion of the functionality provided by the standalone desktopapplication of MATLAB®. Additionally, the technical computing client 250can be any of the software programs available in the MATLAB® productfamily. Furthermore, the technical computing client 250 can be a customsoftware program or other software that accesses MATLAB® functionalityvia an interface, such as an application programming interface, or byother means. One ordinarily skilled in the art will appreciate thevarious combinations of client types that may access the functionalityof the system.

With an application programming interface and/or programming language ofthe technical computing client 250, functions can be definedrepresenting a technical computing task to be executed by either atechnical computing environment local to the client computer 150, orremote on the workstation 270. The local technical computing environmentmay be part of the technical computing client 250, or a technicalcomputing worker running on the client computer 150. The programminglanguage includes mechanisms, described below in more detail, to definea task to be distributed to a technical computing environment and tocommunicate the task to the technical computing worker 270 on theworkstation 170, or alternatively, on the client 150. For example, thetechnical computing client 250 may declare a function to generate arandom set of ten numbers and further delegate that the technicalcomputing worker 270 running on the workstation 170 execute thefunction. Also, the application programming interface and programminglanguage of the MATLAB®-based client 250 includes mechanisms, describedin more detail below, to receive a result from the execution oftechnical computing of the task from another technical computingenvironment. For example, the technical computing client 250 may declarea variable to hold a result returned from the technical computing worker270 performing technical computing of the random generation function.

The distributed functionality features of the programming languages ofthe MATLAB®-based client 250 allows the technical computing client 250to use the computing resources that may be available from a technicalcomputing worker 270 on the workstation 170 to perform technicalcomputing of the task. This frees up the technical computing client 250to perform other tasks, or the client computer 150 to execute othersoftware applications.

The technical computing worker 270 of the system 200 can be a technicalcomputing software application that provides a technical computingenvironment for performing technical computing of tasks, such as thosetasks defined or created by the technical computing client 250. Thetechnical computing worker 270 can be a MATLAB®-based workerapplication, module, service, software component, or a session, whichincludes support for technical computing of functions defined in theprogramming language of MATLAB®. A session is an instance of a runningtechnical computing worker 270 by which a technical computing client canconnect and access its functionality. The technical computing worker 270can include all the functionality and software components of thetechnical computing client 250, or it can just include those softwarecomponents it may need to perform technical computing of tasks itreceives for execution. The technical computing worker 270 may beconfigured to and capable of running any of the modules, libraries orsoftware components of the MATLAB® product family. As such, thetechnical computing worker 270 may have all or a portion of the softwarecomponents of MATLAB® installed on the workstation 170, oralternatively, accessible on another system in the network 140. Thetechnical computing worker 270 has mechanisms, described in detaillater, to receive a task distributed from the technical computing client250. The technical computing worker 270 is capable of performingtechnical computing of the task as if the technical computing client 250was performing the technical computing in its own technical computingenvironment. The technical computing worker 270 also has mechanisms, toreturn a result generated by the technical computing of the task to thetechnical computing client 250.

The technical computing worker 270 can be available on an as neededbasis to the technical computing client 250. When not performingtechnical computing of tasks from the technical computing client 250,the workstation 170 of the technical computing worker 270 can beexecuting other software programs, or the technical computing worker 270can perform technical computing of tasks from other technical computingclients.

FIG. 2B shows another illustrative embodiment of the MATLAB®-baseddistributed computing system of an embodiment of the present inventionin a multi-tier distributed computer system as depicted in FIG. 2B. Themulti-tier distributed system 205 includes a technical computing client250 running on a client computer 150 in communications over a networkcommunication channel 130 to a server 160 on a network 140. The server160 comprises an automatic task distribution mechanism 260 and a jobmanager 265. The job manager 265 interfaces with the automatic taskdistribution mechanism 260 on the server 160. The automatic taskdistribution mechanism 260 communicates over a network communicationchannel 130 on the network 140 to the technical computing worker 270 onthe workstation 170.

The automatic task distribution mechanism 260 comprises one or moreapplication software components to provide for the automaticdistribution of tasks from the technical computing client 250 to thetechnical computing worker 270. The automatic task distributionmechanism 260 allows the technical computing client 250 to delegate themanagement of task distribution to the automatic task distributionmechanism 260. For example, with the programming language of MATLAB®, atask can be defined and submitted to the automatic task distributionmechanism 260 without specifying which technical computing worker 270 isto perform the technical computing of the task. The technical computingclient 250 does not need to know the specifics of the technicalcomputing worker 270. The technical computing client can define afunction to submit the task to the automatic task distribution mechanism260, and get a result of the task from the automatic task distributionmechanism 260. As such, the automatic task distribution mechanismprovides a level of indirection between the technical computing client250 and the technical computing worker 270.

This eases the distributed programming and integration burden on thetechnical computing client 250. The technical computing client 250 doesnot need to have prior knowledge of the availability of the technicalcomputing worker 270. For multiple task submissions from the technicalcomputing client 250, the automatic task distribution mechanism 260 canmanage and handle the delegations of the tasks to the same technicalcomputing worker 270, or to other technical computing workers and holdthe results of the tasks on behalf of the technical computing client 250for retrieval after the completion of technical computing of all thedistributed tasks.

As part of the software components of the MATLAB®-based distributedcomputing environment, a job manager module 265, or “job manager”, isincluded as an interface to the task and result management functionalityof the automatic task distribution mechanism 260. The job manager 265can comprise an object-oriented interface to provide control ofdelegating tasks and obtaining results in the multi-tiered distributedsystem 205. The job manager 265 provides a level of programming andintegration abstraction above the details of inter-processcommunications and workflow between the automatic task distributionmechanism 260 and the technical computing worker 270. The job manager265 also provides an interface for managing a group of taskscollectively as a single unit called a job, and on behalf of a technicalcomputing client 250, submitting those tasks making up the job, andobtaining the results of each of the tasks until the job is completed.Alternatively, the automatic task distribution mechanism 260 can includethe functionality and object-oriented interface of the job manager 265,or the automatic task distribution mechanism 260 and the job manager 265can be combined into a single application, or software component. In anexemplary embodiment, the job manager 265 comprises both thefunctionality of the job manager 265 and the automatic task distributionmechanism 260. One ordinarily skilled in the art will recognize thefunctions and operations of the job manager 265 and the automatic taskdistribution mechanism 260 can be combined in various softwarecomponents, applications and interfaces.

Referring now to FIG. 2C, an exemplary embodiment of the presentinvention is shown with multiple technical computing workers 270A-270Nhosted on a plurality of workstations 170A-170N. The technical computingclient 250 may be in communication through the network communicationchannel 130 on the network 140 with one, some or all of the technicalcomputing workers 270A-270N. In a similar manner, the automatic taskdistribution mechanism 260 may be in communication through the networkcommunication channel 130 on the network 140 with one, some or all ofthe technical computing workers 270A-270N. As such, the technicalcomputing client 250 and/or the automatic task distribution mechanism260 can distribute tasks to multiple technical computing workers270A-270N to scale the distributed system and increase computation timeof tasks. As also shown in FIG. 2C, the technical computing workers270A-270B can be hosted on the same workstation 170A, or a singletechnical computing worker 270C can have a dedicated workstation 170B.Alternatively, one or more of the technical computing workers 270A-270Ncan be hosted on either the client 150 or the server 160.

The computing devices (102, 102′, 102″, 102′″) depicted in FIGS. 1A and1B can be running any operating system such as any of the versions ofthe Microsoft® Windows operating systems, the different releases of theUnix and Linux operating systems, any version of the MacOS® forMacintosh computers, any embedded operating system, any real-timeoperating system, any open source operating system, any proprietaryoperating system, any operating systems for mobile computing devices, orany other operating system capable of running on the computing deviceand performing the operations described herein. Furthermore, thesoftware components of MATLAB®-based distributed computing environmentcan be capable of and configured to operate on the operating system thatmay be running on any of the computing device (e.g., 102, 102′, 102″,102′″). Additionally, each of the client 150, the server 160 and theworkstation 170 can be running the same or different operating systems.For example, the client 150 can running Microsoft® Windows, the server160 can be running a version of Unix, and the workstation a version ofLinux. Or each of the client 150, the server 160 and the workstation 170can be running Microsoft® Windows. Additionally, the software componentsof the MATLAB®-based distributed computing environment can be capable ofand configured to operate on and take advantage of different processorsof any of the computing device (e.g., 102, 102′, 102″, 102′″). Forexample, the software components of the MATLAB®-based distributedcomputing environment can run on a 32 bit processor of one computingdevice 102 and a 64 bit processor of another computing device 102′. In adistributed system, such as the system depicted in FIG. 1B,MATLAB®-based distributed computing application can operate on computingdevices (102, 102′, 102″, 102′″) that can be running on differentprocessor architectures in addition to different operating systems. Oneordinarily skilled in the art will recognize the various combinations ofoperating systems and processors that can be running on any of thecomputing devices (102, 102′, 102″, and 102′″).

Although the present invention is discussed above in terms ofdistributing software components of the MATLAB®-based distributedcomputing application across the computing devices of a client 150,server 160 and workstation 170, any other system and/or deploymentarchitecture that combines and/or distributes one or more of thetechnical computing client 250, job manager 265, automatic taskdistribution mechanism 260 and technical computing worker 270 across anyother computing devices and operating systems available in the network140 may be used. Alternatively, all the software components of theMATLAB®-based distributed computing application can run on a singlecomputing device 102, such as the client 150, server 160 or theworkstation 170.

The MATLAB®-based distributed computing application of an embodiment ofthe present invention provides flexibility in methods of taskdistribution with multiple modes of operation. In FIGS. 3A, 3B and 3C,three modes of task distribution of the MATLAB®-based distributedcomputing environment are shown. FIG. 3A depicts a direct distributionmode, FIG. 3B, an automated distribution mode and FIG. 3C, a batch modeof automated distribution. Additionally, FIG. 3D depicts an exemplaryembodiment of the batch mode of automated distribution.

The direct distribution system 305 of FIG. 3A is intended for thoseusers who desire a high level of control over which technical computingworker 270A-270N executes a particular task. In brief overview of thedirect distribution system 305, the technical computing client 250 is incommunications with a plurality of technical computing workers,270A-270N, each running on their own workstation 170A-170N. In analternative embodiment, one or more of these technical computing workers270A-270N can be running on the same computing device, e.g., workstation270A, or on the client 150 or the server 160. This direct distributionsystem 305 allows a task to be sent to a particular technical computingworker, e.g., technical computing worker 270A of a plurality oftechnical computing workers 270A-270N. Then, the technical computingclient 250 can continue with other work while the specified technicalcomputing worker, e.g., technical computing worker 270A, is performingtechnical computing of the submitted task. Some time after submittingthe task to the technical computing worker 270A, the technical computingclient 250 can then obtain the result of the task from the technicalcomputing worker 270A. Furthermore, each technical computing worker 270Ncan process multiple tasks, e.g., TaskN-M, and for each task produce aresult, e.g., ResultN-M. Alternatively, the technical computing worker270A may perform technical computing of a task without returning aresult, or may return information acknowledging completion of the task.This mode of task distribution is useful for a computer network with arelatively small number of known workstations 170A-170N and technicalcomputing workers 270A-270N. A task can be delegated to a specifiedtechnical computing worker running 270A on a workstation 170A that has ahigher speed configuration than the other workstations 170B-170N. Forexample, a longer task could be executed on such a workstation 170A inorder to speed the overall computation time.

As further depicted in FIG. 3A, the technical computing client 250 ofthe direct distribution system 305 can submit multiple tasks (e.g.,TaskN-M) to each of the multiple technical computing workers 270A-270N.For example, the technical computing client 250 submits task 1 totechnical computing worker 270A, submits task 2 to technical computingworker 270B, and submits task N to technical computing worker 270N. Thetechnical computing client 250 can submit task1, task2 and taskN-M oneimmediately after another or within a certain time between each other.As such, the technical computing workers 270A-270N can be performingtechnical computing of their respective tasks independently and inparallel to each other. Alternatively, the technical computing workers270A-270N may perform technical computing of their respective task whilethe other technical computing workers are idle.

In another embodiment, the technical computing workers 270A-270N mayinclude interfaces and communication channels to interact with eachother as depicted by the phantom arrowed lines between the technicalcomputing workers 270A-270N in FIG. 3A. In such an embodiment, technicalcomputing worker 270A may perform a portion of technical computing ontask1, and then submit task1, and optionally, any generated result orother data, for further technical computing by technical computingworker 270B. Also, the technical computing worker 270A may also submitthe result of its technical computing of task1 to the technicalcomputing client 250, before or after, submitting the task to technicalcomputing worker 270B for further processing. Technical computing worker270B may in turn perform technical computing of task1, and subsequentlysubmit task1 for further processing by technical computing worker 270N.For additional configurability, the technical computing workers270A-270N can obtain information with the task about the identificationof other technical computing workers 270A-270N in the system. Thisinformation would be used to communicate and interact with anothertechnical computing worker. Alternatively, a technical computing worker270A may find another technical computing worker 270B-270N by making afunction or system call, or a method call to a service provider on thenetwork 140. In such a configuration, technical computing workers270A-270N can either execute tasks independently and in parallel to eachother, or also execute tasks serially and subsequent to each other.

Referring now to FIG. 3B, the automated task distribution mode embodiedin system 310 is intended to provide a configuration where the user doesnot want to control which technical computing worker 270A-270N executesa particular task. In brief overview of the automated distribution modeof system 310, a technical computing client 250 is in communication withthe automatic task distribution mechanism 260 running on the server 160.The automatic task distribution mechanism 260 is in communications witha plurality of technical computing workers 270A-270N. Under this mode ofoperation, the technical computing client 250 is not required to haveany specific knowledge of the technical computing workers 270A-270N,e.g., the name of the workstation running a technical computing worker270A-270N, or the availability of the technical computing worker270A-270N to perform technical computing of a task. In alternativeembodiments, it may have prior knowledge of all or a portion of thetechnical computing workers 270A-270N available on the network. Evenwith knowledge of the name or availability of technical computingworkers 270A-270N on the network 140, the technical computing client 250can choose not to specify the name of a particular technical computingworker to perform the task, and let the automated distribution mechanismdistribute the task to any available technical computing worker270A-270N.

In FIG. 3B, the technical computing client 250 submits one or more tasks(Task1-TaskN-M) to the automatic task distribution mechanism 260. Thesetasks can be submitted sequentially or in an order and frequency asspecified by the technical computing client 250. The automatic taskdistribution mechanism 260 obtains the tasks (Task1-TaskN-M) to makethen available for distribution to any of the technical computingworkers 270A-270N. A technical computing worker 270A-270N takes a taskfrom the automatic task distribution mechanism 260 for technicalcomputing of the task, computes a result for the task and provides theresult to the automatic task distribution mechanism 260. For example,technical computing worker 270A takes task 1 from the automatic taskdistribution mechanism 260, computes a result, Result 1, for task 1, andsubmits Result 1 to the automatic task distribution mechanism 260. Theautomatic task distribution mechanism 260 makes the results(Result1-ResultN-M) available to the technical computing client 250 asthey get submitted from the technical computing worker 270A-270Ngenerating and submitting the respective result. At a time or methoddetermined by the technical computing client 250, the technicalcomputing client 250 obtains the results of the computed tasks from theautomatic task distribution mechanism 260. For example, the technicalcomputing client 250 may obtain all the results (Result1-ResultN-M) atthe same time after all the results have been computed, or each resultmay be obtained after it becomes available in the automatic taskdistribution mechanism 260. Accordingly, the technical computing client250 can determine the order and frequency of obtaining one or more ofthe results. As with the direct distribution mode, the technicalcomputing workers 270A-270N can also communicate and interact with eachother, as depicted by the phantom arrowed lines between the technicalcomputing workers 270A-270N in FIG. 3B, to execute tasks both seriallyand in parallel by submitting a task to another technical computingworker 270A-270N.

The batch mode of automated task distribution embodied in system 315 ofFIG. 3C is intended to provide a configuration where the user canspecify a group of related tasks as a job and provide the batch oftasks, or the job, to the automatic task distribution mechanism 260. Inbrief overview of the batch mode of the automatic distribution system315, a technical computing client 250 is in communication with the jobmanager 265 on the server 160. The job manager 265 interfaces andcommunicates with the automatic task distribution mechanism 260 runningon the same server 160. Each of the technical computing workers270A-270N is in communication with the automatic task distributionmechanism 260. A job manager 265 interfaces with and is associated withone automatic task distribution mechanism 260. Alternatively, the jobmanager 265 and the automatic task distribution mechanism could be ondifferent servers 160. Additionally, a plurality of job managers andautomatic task distribution mechanisms could be running on a singleserver 160 or each on their own servers. Each of the plurality of jobmanagers interface with and are associated with one of the plurality ofautomatic distribution mechanisms. This allows the distributed system toscale the number of instances of the job manager 265 and the automaticdistribution mechanism 260 to handle additional multiple technicalcomputing clients 250 distributing tasks.

In batch mode as depicted in FIG. 3C, the technical computing client 250defines the job. The technical computing client 250 has a programminglanguage environment by which it can declare tasks, declare a job andassociate the tasks with the job. Instead of submitting each taskseparately as depicted in FIG. 3B, the technical computing client 250submits the job containing all the associated tasks to the job manager265. The job manager 265 is a software component that provides anobject-oriented interface to the automatic task distribution mechanism260. The job manager 265 obtains the tasks from the job and provides thetasks to the automatic task distribution mechanism 260 for technicalcomputing workers 270A-270N to take and compute results. For example,technical computing client 250 defines a job, Job1, with a set of threetasks: Task1, Task2 and TaskN-M. The technical computing client 250 thensubmits Job1 to the job manager 265. The job manager 265 obtains Job1and obtains each of the tasks, Task1-TaskN-M from Job 1. Then, accordingto the configured logic of the job manager 265, described in more detailbelow, the job manager 265 submits each of the tasks to the automatictask distribution mechanism 260 for technical computing by a technicalcomputing worker 270A-270N. Technical computing worker 270A may takeTask1 from the automatic task distribution mechanism 260, compute aResult1 for Task1 and provide the Result1 to the automatic taskdistribution mechanism 260. Technical computing worker 270B andtechnical computing worker 270N, in a similar fashion, compute andprovide results for Task2 and TaskN-M respectively. The job manager 265then obtains the set of results for the completed job of Job1 andprovides the results of each of the tasks to the technical computingclient 250.

The job manager 265 further comprises a queue 267 for arranging andhandling submitted jobs. For example, the job manager 265 may handlejobs in a first-in first-out (FIFO) manner. In this case, the jobmanager 265 does not process the next job until all the tasks from thecurrent job have been processed by the automatic task distributionmechanism 260. Additionally, the job manager 265 using the queue 267supports handling multiple job submissions and task distribution frommultiple technical computing clients 250. If a first technical computingclient 250 submits a job, Job1, the job manager 265 places that jobfirst in the queue 267. If a second technical computing client submits asecond Job, for example, Job 2, the job manager places the job in thequeue behind the Job1 from the first client. In this manner, alltechnical computing clients 250 accessing the services of the jobmanager 265 get serviced for task distribution. One ordinarily skilledin the art will recognize that the job manager 265 could implement avariety of algorithms for processing jobs in a job queue 267 and forhandling multiple technical computing clients 250. For example, a usermay be able to specify a priority level for a specified job, or thelogic of the job manager 265 may make task distributing and processingdecisions based on the configuration and availability of technicalcomputing workers 270A-270B to determine a preferred or optimalselection of technical computing of jobs and tasks.

As with the other distribution modes of FIG. 3A and FIG. 3B, thetechnical computing workers 270A-270N in batch mode can also communicateand interact with each other as shown by the phantom arrowed linesbetween technical computing workers 270A-270N in FIG. 3C. This allowsthe technical computing workers 270A-270N to execute tasks both seriallyand in parallel by submitting a task to another technical computingworker. As part of the information associated with the task obtained bya technical computing worker or by other means, such as a system orfunction call, or a method call to a service, a technical computingworker 270A can obtain information about the other technical computingworkers 270B-270N assigned to or working on tasks associated with aspecific job, or available on the network 140.

The exemplary embodiment of the batch mode of automated taskdistribution system 320 of FIG. 3D depicts a configuration where the jobmanager 265 contains the automatic task distribution mechanism 260. Inbrief overview of system 320, a technical computing client 250 is incommunication with the job manager 265 on the server 160. The jobmanager 265 comprises a task distribution mechanism 260 running as partof the job manager 265 on the same server 160. The job manager 265further comprises a queue 267 for arranging and handling submitted jobs.The technical computing workers 270A-270N are in communication with thejob manager 265 to receive tasks from the automatic task distributionmechanism 260 of the job manager 265.

In batch mode operation as depicted in FIG. 3D, the technical computingclient 250 defines the job comprised of related tasks. Instead ofsubmitting each task separately as depicted in FIG. 3B, the technicalcomputing client 250 submits the job containing all the related tasks tothe job manager 265. The job manager 265 obtains the tasks from the joband submits the tasks, via an automatic task distribution mechanism 260,to the technical computing workers 270A-270N to perform technicalcomputing. For example, technical computing client 250 defines a job,Job1, with a set of three tasks: Task1, Task2 and TaskN-M. The technicalcomputing client 250 then submits Job1 to the job manager 265. The jobmanager 265 obtains Job1 and obtains each of the tasks, Task1-TaskN-M,from Job 1. Then, the automatic task distribution mechanism 260 of thejob manager 265 submits each of the tasks to a technical computingworker 270A-270N for technical computing. For example, the job manager265 may submit Task 1 to technical computing worker 270A to compute andproduce a Result1 for Task1. Technical computing worker 270A providesthe Result1 to the job manager 265. In a similar fashion, the jobmanager 265 may submit Task2 and TaskN-M to technical computing worker270B and technical computing worker 270N with each technical computingworker 270A and 270B providing the results for Task2 and TaskN-Mrespectively to the job manager 265. When all the results from each ofthe tasks of Job1 are received, the job manager 265 then provides theresults of each of the tasks of Job 1 to the technical computing client250.

In the batch mode of operation of depicted in FIGS. 3C and 3D, the jobmanager 265 or automatic task distribution mechanism 260 can beconfigured to define the minimum and maximum numbers of technicalcomputing workers 270A-270N to perform the tasks associated with a job.This feature can be configured on a job by job basis. Alternatively, itmay be configured for a portion or all of the jobs. The configuration ofthese settings can be facilitated through parameters associated with asubmitted job, such as in one or more properties of a job object, or inone or more fields of a data structure representing a job.Alternatively, these settings may be facilitated through any interfaceof the job manager 265 or automatic task distribution mechanism 260,such as in a configuration file, graphical user interface, command ormessage or any other means by which values for these settings may beset.

The system (e.g. 315 or 320) can compare the number of technicalcomputing workers 270A-270N registered, or otherwise available, with thejob manager 265 or automatic task distribution mechanism 260 against theconfigured setting of the minimum number of technical computing workersparameter. The system may not start a job unless there is a minimumnumber of technical computing workers 270A-270N registered or availableto work on the job. In a similar manner, the system can check the numberof available or registered technical computing workers 270A-270N againstthe setting of the maximum number of technical computing workersparameter. As the system distributes tasks of a job, it can make surenot to distribute tasks to more than the defined number of technicalcomputing workers 270A-270N. In some embodiments, the minimum number oftechnical computing workers will be set to a value equal to the settingof the maximum number of technical computing workers. In such a case,the system may only start the job if the minimum number of technicalcomputing workers 270A-270A are available or registered to start thejob, and may not use any more technical computing workers 270A-270N thanthe minimum setting. This is useful for cases where the user wants toconfigure a job to have each task be assigned to and run on separatetechnical computing workers 270A-270N. For example, a job may have 5tasks and the minimum and maximum technical computing worker settingsmay be set to 5.

Additionally, in any of the embodiments depicted in FIGS. 3A-3D, thesystem can determine or select the technical computer worker 270A-270Nto work on a task by operational and/or performance characteristics ofthe technical computing worker 270A-270N and/or workstation 170A-170N.For example, a technical computing worker 270A may work on a task basedon the version of the MATLAB®-based distributed computing applicationthat is installed on the workstation 170A or that the technicalcomputing worker 270A is capable of running.

Additionally, the technical computing worker 270A-270N and workstation170A-170N may have a specification or profile, such as a benchmarkcomparison results file, which provides a description of any operationaland performance characteristics of the version of the MATLAB®-baseddistributed computing application running on that specific computingdevice 102 of the workstation 170A. This profile can be in comparison toknown benchmarks of operational and performance characteristics of theMATLAB®-based distributed computing application running on certaincomputing devices (102, 102′, 102″, 102′″), with specified versions ofthe MATLAB®-based distributed computing application, operating systemsand other related software, or any other system component or attributethat may impact the operation or performance of the MATLAB®-baseddistributed computing application. This profile may be described in afile accessible over the network or retrievable through an interfacemechanism of the technical computing worker 270A-270N. Furthermore, thesystem may determine the technical computing worker 270A-270N to work ona task by any configuration or properties set on the technical computingworker 270A-270N or workstation 170A-170N. For determining a technicalcomputing worker 270A-270N to work on a task, the system may discoverany configuration, properties, and operational and performancecharacteristics of the MATLAB®-based distributed computing applicationof a technical computing worker 270A-270N running on a workstation170A-170N through any interface of the technical computing worker 270A-Nor workstation 170A-170N, such as, for example, in a file, graphicaluser interface, command or message.

The MATLAB®-based distributed computing application of an embodiment ofthe present invention also provides additional flexibility in that themultiple modes of task distribution can be performed concurrently in thedistributed system. FIG. 4 is an illustrative embodiment of the presentinvention showing the distributed application performing, concurrently,the combination of the modes of operation depicted in FIGS. 3A-3C.Additionally, the distributed system 400 is depicted supporting multipleclients 250A-250N communicating with multiple job managers 265A-265N andmultiple automatic task distribution mechanisms 260A-260N. With thesemultiple modes of operation, any technical computing client 250A-250Ncan distribute tasks directly to a technical computing worker 270A-270N,submit tasks to the automatic task distribution mechanism 260, or submita job to the job manager 265. In the depicted multi-client distributedsystem 400, a plurality of technical computing clients 250A-250N are incommunication with one or more job managers 265A-265N. The job manager265A can be a separate component interfacing to the automatic taskdistribution mechanism 260A, or the job manager 265N can be a singleapplication comprising the functionality of the automatic taskdistribution mechanism 260N. The one or more technical computing workers270A-270B are in communication with the one or more job managers 265N orthe one or more automatic task distribution mechanisms 260A. Thedistributed architecture of the present invention allows for a scalableand flexible distributed technical computing environment supporting avariety of deployments and network topologies.

For example, as shown in FIG. 4, a technical computing client 250A canoperate in both the direct distribution mode and the batch automateddistribution mode. As such, technical computing client 250A can submit atask to and receive a result from the automatic task distributionmechanism 260A without using the job manager 265A. In another instance,technical computing client 250A can submit a job, Job1, to the jobmanager 265A for task distribution by the automatic task distributionmechanism 260A to receive results from the job, such as Job1Results. Inanother example of FIG. 4, technical computing client 250B can operatein batch automated distribution mode but submit jobs separately to afirst job manager 265A running on a first server 160A and a second jobmanager 265N running on a second server 160N. In yet another example,technical computing client 250N operates in both the automateddistribution and direct distribution modes. Technical computing client250N submits a task, Task2, to automatic task distribution mechanism260N and receives a result, Task2Result, from computing by a technicalcomputing worker 270A-270N assigned by the system 400. Technicalcomputing client 250N also directly submits a task to technicalcomputing worker 270N and receives a computed result directly from thetechnical computing worker 270N. One ordinarily skilled in the art willappreciate the various combinations of deployments that can occur withsuch a distributed system 400 with multiple modes of operation. As such,the present invention offers scalability and flexibility for distributedprocessing of complex technical computing requirements.

In another aspect, the present invention relates to methods fordistributing tasks to technical computing workers 270A-270N forprocessing, either directly, or indirectly and automatically, asdescribed above in reference to the embodiments depicted in FIGS. 3A-3C.FIGS. 5A, 5B and 5C each show a flow diagram of the methods of the threemodes of task distribution of the MATLAB®-based distributed computingapplication. FIG. 5A depicts the method of direct distribution, FIG. 5B,the method of an automated distribution, and FIG. 5C, a batch modemethod of automated distribution.

Referring now to FIG. 5A, one embodiment of the method 500 to distributea task from a technical computing client 250 to a technical computingworker 270 is illustrated. Method 500 is practiced with the directdistribution embodiment of the invention depicted in FIG. 3A. Thetechnical computing client 250 defines a task comprising an operationfor technical computing (step 502). The task defines a function, commandor operation, such as may be available in the programming language ofMATLAB®, and the number of arguments and input data of the arguments.The technical computing client 250 then submits the task (step 504) tothe technical computing worker 270. The technical computing worker 270receives the task (step 506) and performs the requested technicalcomputing as defined by the task (step 508). In performing the technicalcomputing on the task, an associated result may be generated (step 510).In alternative embodiments, either no result is generated, or no resultis required to be returned to the technical computing client 250. Aftergenerating the result from computing the task, the technical computingworker 270 provides the result (step 512) to the technical computingclient 250, and the technical computing client 250 obtains the resultfrom the technical computing worker 270 (step 514).

Referring now to FIGS. 5B, an embodiment of the method 525 to distributea task from a technical computing client 250 to a technical computingworker 270 in automated task distribution mode is illustrated. Method525 is practiced with the automatic task distribution embodiment of theinvention depicted in FIG. 3B. A technical computing worker 270registers to receive notification of one or more tasks (step 527)becoming available, or appearing, in the automatic task distributionmechanism 260. The technical computing client 250 defines a taskcomprising an operation for technical computing (step 502). Thetechnical computing client 250 then submits the task (step 530) to theautomatic task distribution mechanism 260. The automatic taskdistribution mechanism 260 receives the task and makes the taskavailable for distribution (step 532) to a technical computing worker270. The technical computing client registers (step 534) with theautomatic task distribution mechanism 260 to receive notification when aresult associated with the task submitted in step 530 is available, orappears, in the automatic task distribution mechanism 260. The automatictask distribution mechanism 260 registers the technical computing client250 for notification when the result appears (step 536). The automatictask distribution mechanism 260 provides notification (step 538) to thetechnical computing worker 260 of the availability of the task. Inresponse to receiving the notification (step 540), the technicalcomputing worker obtains (step 544) the task provided (step 540) fromthe automatic task distribution mechanism 260. The technical computingworker 270 performs the requested technical computing on the function orcommand as defined by the task (step 508). In performing the technicalcomputing on the task, an associated result may be generated (step 510).In alternative embodiments, either no result is generated or the resultis not required to be returned to the technical computing client 250.After generating the result from computing the task (step 510), thetechnical computing worker 270 provides the result (step 512) to theautomatic task distribution mechanism 260. After obtaining the resultfrom the technical computing worker 250 (step 550), the automatic taskdistribution mechanism 260 notifies (step 552) the technical computingclient 250 that the result is available. The technical computing client250 obtains (step 556) the result provided (step 558) by the automatictask distribution mechanism 260.

Referring now to FIGS. 5C and 5D, one embodiment of the method 560 todistribute a task from a technical computing client 250 to a technicalcomputing worker 270 in a batch mode of operation is illustrated. Method560 is practiced with the batch mode of the automatic task distributionsystem (e.g. 315 or 320). A technical computing worker 270 registers toreceive notification of one or more tasks (step 527) becoming available,or appearing, in the automatic task distribution mechanism 260. In anexemplary embodiment, the technical computing worker registers toreceive a task from the job manager 265 or automatic task distributionmechanism 260 as notification to perform computing on the task. Thetechnical computing client 250 defines one or mores tasks (step 562),with one or more of the tasks comprising an operation or function fortechnical computing. The technical computing client 250 groups one ormore tasks of the tasks into a job (step 564). The technical computingclient 250 then submits the job (step 566) to the job manager 265. Thejob manager 265 obtains the job (step 568) from the technical computingclient 250 and provides the one or more tasks of the job (step 570) tothe automatic task distribution mechanism 260, which makes the one ormore tasks available for distribution (step 572) to one or moretechnical computing workers 270A-270N. In an exemplary embodiment, thejob manager 265 or the automatic task distribution mechanism 260 maysubmit the one or more tasks to the one or more technical computingworkers 270A-270N. In another embodiment, the technical computing worker270 may take the task from the job manager 265 or the automatic taskdistribution mechanism 260.

The technical computing client 250 registers (step 574) a callbackfunction with the job manager 265. The technical computing client 250may setup and/or register other callback functions based on changes inthe state of processing of a task or job, or changes in the state of thejob manager, or other events available to trigger the calling of afunction. The job manager 265 calls this function when the job iscompleted, i.e., when each of the one or more tasks of the job have beencompleted. In turn, the job manager 265 may register (step 576) with theautomatic task distribution mechanism 260 to receive notification of theresults of the submitted tasks appearing in the automatic taskdistribution mechanism 260, or being received from the technicalcomputing worker 270A-270N. In one embodiment, the automatic taskdistribution mechanism 260 registers the notification request of the jobmanager (step 578). Then, the automatic task distribution mechanism 260provides notification to the technical computing worker 270 of theavailability of the task (step 538). In an exemplary embodiment, thetask is sent, by the job manager 265 to the technical computing worker270 as notification to perform the task. In response to receiving thenotification or the task (step 540), the technical computing worker 270obtains (step 542) the task provided (step 540) from the automatic taskdistribution mechanism 260 or the job manager 265. The technicalcomputing worker 270 performs the requested technical computing on theoperation as defined by the task (step 508). In performing the technicalcomputing on the task, an associated result may be generated (step 510).In alternative embodiments, either no result is generated or the resultis not required to be returned to the technical computing client 250.After generating the result from computing the task (step 510), thetechnical computing worker 270 provides the result (step 510) to theautomatic task distribution mechanism 260 or the job manager 265. Afterobtaining the result from the technical computing worker 250 (step 550),the automatic task distribution mechanism 260 notifies (step 587) thejob manager 265 that the result is available. In an exemplaryembodiment, the job manager 265 receives the results from the technicalcomputing worker 270. In response to receiving the notification or theresult (step 589), the job manager 265 obtains the result (step 591)provided by (step 593) the automatic task distribution mechanism 260. Ifthe job manager 265 received the last result of the job, the job manager265 will notify the technical computing client 250 that the job iscompleted via the registered callback function (step 595). Aftertriggering the completed job callback function (step 597), the technicalcomputing client 250 obtains (step 598) the result provided (step 599)by the job manager 265.

With the methods of task distribution described above (methods 500, 525,and 560) in view of the embodiment of the concurrent multipledistribution modes of operation depicted in system 400 of FIG. 4, oneordinarily skilled in the art will recognize the application of theabove methods to the multiple modes of operation for each technicalcomputing client 250A-250N in FIG. 4.

FIG. 6A shows the details of one embodiment of the automation featuresof a technical computing client 250 and technical computing worker 270distributing tasks and results with the automatic task distributionmechanism 260. The automatic task distribution mechanism 260 may beobject-oriented and comprise an object exchange repository 662, such asJavaspace, a Sun Microsystems, Inc. technology for distributedapplication development built using Jini network technology also fromSun Microsystems, Inc.

The JavaSpace technology views an application as a collection ofprocesses cooperating via a flow of objects into and out of an objectexchange repository 662, known as a space. It does not rely on passingmessages directly between processes or invoking methods directly onremote objects. A key feature is that spaces are shared. Many remoteprocesses, such as technical computing workers and job managers of thepresent invention, can interact with the network accessible objectstorage of a space. Spaces are also persistent and therefore, providereliable storage. Spaces are also associative in that objects in thespace can be located by associative lookup rather than by memorylocation or identifier, e.g., in a shared memory solution. Additionally,a space has a few key operations to perform on the object repository tohandle the exchanging of objects. A write operation writes an object,such as a task object, to the space. A take operation takes an object,such as result object, from the space. A take is the equivalent of aread and removes the object from the space. A read operation obtains acopy of the object from the space and leaves the object intact in thespace. Other operations allow remote processes, such as technicalcomputing workers, technical computing clients and job managers toregister for event notification when a certain object appears in thespace. An object appears in the space when a process writes the objectto the space. The remote process listens for the appearance of objectsin the space and the space notifies the registered remote process whenthe object appears.

In an alternative embodiment of the present invention, an objectexchange repository such as one implemented with JavaSpace technology isused to provide a level of indirection between the technical computingclient 250 and the technical computing worker 270 with regards to taskand result objects. By the automatic communication features describedabove, the technical computing client 250 does not need to specify anamed technical computing worker 270 to perform technical computing. Theautomatic task distribution mechanism 260 comprising the object exchangerepository 662 handles task distribution to technical computing workers270A-270N registered with the automatic task distribution mechanism 260.To distribute tasks and results, the technical computing client 250 andtechnical computing worker 270 read and write task and result objects tothe object exchange repository 662.

Referring now to FIG. 6A, a technical computing client 250 executes awrite transaction to write a task object to the object exchangerepository 662 of the automatic task distribution mechanism 260. Thetask object defines a task for technical computing by a technicalcomputing worker 270 who obtains the task object from the objectexchange repository 662. The technical computing client 250 registerswith the object exchange repository 662 to be notified when a resultobject associated with the submitted task object is available in theobject exchange repository 662. In this way, the technical computingclient 250 can listen for the appearance of results for tasks submittedfor technical computing processing. A technical computing worker 270registers with the object exchange repository 662 to be notified when atask object appears in the object exchange repository 662. After thetechnical computing client 250 writes the task object, the objectexchange repository 662 sends a notification to the technical computingworker 270 informing of the task object being available in the objectexchange repository 662. The technical computing worker 270, in responseto the notification, performs a take operation on the object exchangerepository 662 to retrieve the submitted task object. The take operationremoves the task from the object exchange repository 662. In thealternative, a read operation can be performed to get a copy of the taskobject without removing it from the object exchange repository 662.

The technical computing work 270 obtains the name and arguments of thefunction to compute from the data structure of the task object. Then thetechnical computing worker 270 provides the result from the computationby performing a write operation to write a result object to the objectexchange repository 662. The result object defines within its datastructure a result of the computation of the function defined in thetask object and performed by the technical computing worker 270. Thewrite of the result object to the object exchange repository 662triggers the notification event registered by the technical computingclient 250. The technical computing client 250 listening for the resultto appear in the object exchange repository 662, in response to thenotification, performs a take operation, or alternatively a readoperation, to obtain the result object associated with the submittedtask. The technical computing client 250 then obtains the resultinformation defined within the data structure of the retrieved resultobject.

FIG. 6B depicts the operations of the automatic task distributionmechanism 260 interfacing with a job manager 265. In this embodiment,the job manager 265 is a software component providing a front-endinterface to the automatic task distribution mechanism 260, and in thisexemplary embodiment, the JavaSpace object exchange repository 662. Thejob manager 265 supports the batch mode of automatic task distributionoperation of the invention. Under batch processing, tasks are groupedinto a job in the technical computing client 250 and then the job issubmitted to the job manager 265 for task distribution and taskprocessing by a technical computing worker 270. When the job manager 265receives a job from one or more technical computing clients 250A-250N,the job manager 265 places the job into a position in a job queue 267.The job queue 267 is a data structure for holding and arranging jobs,and maintaining the state and other attributes about the job while thejob is being processed. The job manager 265 handles jobs in a first-infirst-out (FIFO) manner and manages the job queue 267 to first take outthe job that was first received by the job manager 265 and placed intothe job queue 267. For example, the job queue 267 depicted in FIG. 6B isholding the jobs of job1, job2 through jobn. Job1 is the first submittedjob to the job manager 265 and is positioned at the top of the job queue267. Job2 through JobN are the next subsequent jobs in the job queue 267in order of a FIFO queuing system. While Job1 is being processed, thejob manager 265 does not start to process the next job, Job2, untilthere are no tasks from the Job1 remaining to be processed in the objectexchange repository 662. One ordinarily skilled in the art willappreciate the variations of job management implementations that may beaccomplished using a job queue with different queuing and prioritymechanisms.

Still referring to FIG. 6B, the technical computing client 250 submits ajob to the job manager 265 and specifies a callback function with thejob manager 265. The job manager 265 is to call the callback functionwhen the job is completed. The job manager receives the job, e.g., job1,and places the job into a job queue 267. The job manager 265 thenobtains the one or more tasks from the first job submitted to the jobqueue. In the embodiment of a JavaSpace implementation of the objectexchange repository 662, the job manager 265 writes the task object tothe object exchange repository 662. The job manager 265 registers withthe object exchange repository 662 to receive a notification when aresult object associated with the task appears in the object exchangerepository 662, also known as a space. The job manager 265 listens andwaits for the result to appear in the object exchange repository 662.

A technical computing worker 270 registers with the object exchangerepository 662 to receive a notification when a task object appears inthe object exchange repository 662. Then the technical computing worker270 listens for the appearance of task objects. When the task issubmitted to the object exchange repository 662 by the job manager 265,the technical computing worker 270 receives a notification and takes thetask from the object exchange repository 662 by performing a takeoperation. The technical computing worker 270 obtains the function to beexecuted from the definition of the function in data structure of thetask object, performs the function and generates a result of thefunction for the task. Then the technical computing worker 270 submits aresult object representing a result of the task to the object exchangerepository by performing a write operation. The job manager 265 waitingfor the result to appear in the object exchange repository 662 receivesa notification from the object exchange repository 662 that the resultis available. The job manager 265 checks to see if this is the lastresult to be obtained from the object exchange repository 662 for thejob currently being processed. If the result is the last result, the jobmanager 265 then notifies the technical computing client 250 that thejob is completed by calling the registered callback function. Inresponse to executing the callback function, the technical computingclient 250 then interfaces with the job manager 265 to retrieve theresults from the job manager 265, which the job manager 265 retrievesfrom the object exchange repository 662 by performing a take operation.

FIG. 6C depicts an exemplary embodiment of details of the batch mode ofoperation of the present invention using a database rather than anobject exchange repository. In this embodiment, the job manager 265includes the functionality of the automatic task distribution mechanism260. In brief overview, the technical computing client 250 is incommunication with the job manager 265, which is in communication withthe technical computing worker 270. The job manager comprises a jobqueue 267, an automatic task distribution mechanism 260, a job runner667, a worker pool 668 and a database 669. Any of these components ofthe job manager 265 can be a separate library, interface, softwarecomponent or application. In an exemplary embodiment, these componentscan be running in their own processing thread to provide multi-taskingcapabilities.

The worker pool 668 contains a list of technical computing workers270A-270N that are available to work on a task. These technicalcomputing workers 270A-270N may on startup register with a job manager265. The name of the job manager 265 the technical computing worker270A-270N is associated with may be configurable by an interface of thetechnical computing worker 270A-270N, or by a command line startupparameter, or an external configuration or registration file. The workerpool 668 may keep a list of “good” technical computing workers270A-270N, or those workers to which the job manager 265 can communicatewith and can determine has such a status to be available for processingtasks. The job manager 265 can update the worker pool 667 by goingthrough the list of technical computing workers 270A-270N registered inthe worker pool 667 and sending communications to each of the technicalcomputing workers 270A-270N to determine their status and if they areavailable. Accordingly, the worker pool 667 can be updated to determinethe current set of technical computing workers 667 available, orotherwise able to receive tasks from the job manager 265.

The job runner 667 is responsible for determining the next task to workon and for submitting the task to a technical computing worker270A-270N. The job runner 667 works with the job queue 267 and takes thenext task for processing from a job in the job queue 267. The job runner667 obtains from the worker pool 668 a name of or reference to atechnical computing worker 270A-270N and submits the task for processingto the obtained technical computing worker 270A-270N. The job runner 667may be configured to have business rule logic to determine the next taskto take from the job queue either in a FIFO manner supported by the jobqueue 267 or any other manner based on priority, availability, task andjob option settings, user configuration, etc. The job runner 667 inconjunction with the worker pool 668 and the job queue 267 can form aportion of or all of the functionality of the automatic taskdistribution mechanism 260. The job runner 667 can have such logic todetermine from the worker pool 668 which technical computing worker270A-270N should be assigned and sent a task from the job queue 267.Alternatively, a separate automatic task distribution mechanism 260 canbe responsible for determining the technical computing worker 270A-270Nto be assigned a task and to send the task to the assigned technicalcomputing worker 270A-270N. In any of these embodiments, the technicalcomputing worker 250 does not need to know the identity, such as via ahostname or an internet protocol address, of the technical computingworker 270A-270N assigned to perform technical computing on a task.

The job manager 265 also has a database 669 for storing and retrievingjob manager, job and task objects and data, or other objects and data tosupport the operations described herein. For example, jobs in the jobqueue 267, the list of workers of the worker pool 668, the tasks of anyjobs in the job queue 267, the properties of any of the task, job or jobmanager objects may be stored in the database 669. The database 669 canbe a relational database, or an object-oriented database, such asdatabase software or applications from Oracle® or SQL Server fromMicrosoft®, or any other database capable of storing the type of dataand objects supporting the operations described herein. The database 669can be an in process database 669 of the job manager 265 or it can be aremote database 669 available on another computing device 102′ oranother server 260′. Furthermore, each instance of the job manager265A-265N could use a different database and operating system than otherinstances of the job manager 265A-265N, or be using a local databasewhile another job manager 265A-265N uses a remote database on anotherserver 160′. One ordinarily skilled in the art will appreciate thevarious deployments of local or remote database access for each of theone or more job managers 265A-265N.

The job manager 265 can be configured to execute certain functions basedon changes of the state of a job in the queue 267. For example, thetechnical computing client 250 can setup functions to be called when ajob is created in a job queue 267, when the job is queued, when a job isrunning or when a job is finished. The job manager 265 is to call thesefunctions when the appropriate change in the state of job occurs. In asimilar manner, the task and job can be configured to call specifiedfunctions based on changes in state of the task or job. For example, ajob may be configured to call a function when a job is added to thequeue, when a task is created, when a task is completed, or when a taskstarts running. A task may be configured to call a function when thetask is started, or running.

Referring still to FIG. 6C, the technical computing client 250 submits ajob, Job1, comprised of one or more tasks, such as Task 1 and Task2, tothe job manager 265. The job manager receives the job, e.g., job1, andplaces the job into a job queue 267. The job runner 667 then obtains theone or more tasks from the first job submitted to the job queue 267. Atechnical computing worker 270 registers with the job manager 265 and islisted in the worker pool 668 of the job manager 265. From the workerpool 668, the job runner 667 determines a technical computing worker270A-270N to submit the task for processing. The technical computingworker 270A-270N obtains the function to be executed from the definitionof the function in data structure of the task object, performs thefunction and generates a result of the function for the task. Then thetechnical computing worker 270 updates the task object to provide aresult of the task. For example, the task object may have a fieldrepresenting the output arguments from the execution of the functiondefined by the task. The output arguments may contain one or more arraysof data as allowed by the programming language of MATLAB®. Additionally,the task object may contain an error field to which the technicalcomputing worker 270A-270N updated to indicate any error conditions inperforming the task or executing the function of the task. The jobmanager 265 checks to see if this is the last result to be obtained froma technical computing worker 270A-270N for the job currently beingprocessed. If the result is the last result, the job manager 265 canprovide the set of task results for the completed job to the technicalcomputing client 250.

Although the invention is generally discussed in terms of a job manager265, automatic task distribution mechanism 260 and technical computingworker 250 as distributed software components available on variouscomputing devices in the network, these software components can beoperated as services in a service oriented distributed architecture. Oneembodiment of a service oriented technology approach is the use of Jininetwork technology from Sun Microsystems, Inc. Jini network technology,which includes JavaSpaces Technology and Jini extensible remoteinvocation, is an open architecture that enables the creation ofnetwork-centric services. Jini technology provides a method ofdistributed computing by having services advertise the availability oftheir provided service over a network for others to discover. Clientsand other software components can discover the advertised services andthen make remote method calls to the discovered services to access thefunctionality provided by the service. As such, the software componentsof the MATLAB®-based distributed computing application can beimplemented as services which can be discovered and looked-up viaadvertising.

Referring now to FIG. 7, an exemplary embodiment of the invention isshown implementing a service oriented approach with Jini networktechnology. In broad overview of the system 700, the technical computingclient 250, technical computing workers 270A-270N, job managers265A-265N, automatic task distribution mechanisms 260A-260N are incommunication over the network 140 via network communication channels130. Additionally there is a network server 760 in communication withthe network 140 through the network communication channel 130. Thenetwork server 760 hosts a code base server 710. In an exemplaryembodiment, the code base server 710 is an ftp server. In otherembodiments, the code base server 710 is a web server, such as Java webserver, or an http server. The code base server 710 is capable of andconfigured to upload files, including class or interface files. In anexemplary embodiment, the code base server 710 may upload JAR files. Thecode base server 710 may be available on the network 140 to Jini basedservices to obtain class files as a service on the network 140 may need,or it may be available to a technical computing client 250 to determinethe interface to a service on the network 140.

In support of implementing software components of the present inventionas Jini services, one or more of the following Jini services areavailable on the network server 760 on the network 140: Reggie 718,Mahalo 716, Fiddler 714 and Norm 712. These services are part of the SunTechnology Jini network technology implementation. Reggie 718 is a Jiniservice that provides service registration and discovery. This allowsclients of a service to find the service on the network 140 withoutknowing the name of the computing device the service is running on.Mahalo 716 is a transaction manager service that provides fault toleranttransactions between services and clients of the service accessing theservice. Fiddler 714 is a lookup discovery service. A Jini based serviceneeds to register itself with an instance of Reggie in order to bediscoverable on the network 140. The lookup discovery service of Fiddler714 allows the service to find new Reggie services and register withthem while inactive. Norm 712 is a lease renewal service. Servicesregistered with Reggie are leased. When the lease on a registrationexpires, the service becomes unavailable from the instance of Reggie.Norm allows a Jini service to keep leases from expiring while theservice is inactive. The services of Reggie, Mahalo, Fiddler and Normcan be run on any computing device 102 on the network 140 capable ofrunning these services and can be run on a single java virtual machine(JVM).

Referring again to FIG. 7, the technical computing workers 270A-270N,which provide MATLAB® sessions, are made available as Jini Services tosupport the direct task distribution mode of operation of the invention.The technical computing workers 270A-270N register with a lookup servicesuch as Reggie 718. This allows the technical computing workers270A-270N to be discoverable on the network 140 by a technical computingclient 250 without the technical computing client 250 knowinginformation like the host name of the workstations 170A-170N thetechnical computing workers 270A-270N are running on, or the port numberto which a specific technical computing worker 270A-270N service islistening on, or a worker name associated with a technical computingworker 270A-270N.

The technical computing workers 270A-270N also support serviceactivation with an activation daemon 740A-740N software component.Activation allows a technical computing worker service 270A-270N toregister with an activation daemon 740A-740B to exit and becomeinactive, but still be available to a technical computing client 250. Inall three distribution modes of operation as embodied in FIGS. 3A-3C,the MATLAB®-based technical computing workers 270A-270N can be activatedby an activation daemon 740A-740N. This means that an activation daemon740A-740N starts and stops the technical computing worker 270A-270N. Forexample, the technical computing worker 270A service registers with theactivation daemon 740A on workstation 170A. The technical computingworker 270A includes the activation states of active, inactive anddestroyed. In the active state, the technical computing worker 270A isstarted and is available for remote method calls from a technicalcomputing client 250. The starting of the service and its availabilityfor remote method calls, or an instance of a running of the service, maybe referred to a session. In the inactive state, the technical computingclient 250 is not started, but is still available for remote methodcalls from a technical computing client 250. If a remote method call tothe technical computing worker service 270A is made by the technicalcomputing client 250, the technical computing worker service 270A willbe started by the activation daemon 740A, and the method call will beexecuted by the technical computing worker service 270A. In thedestroyed state, the technical computing worker service 270A is notrunning and is not registered with the activation daemon 740A. In thisstate, the technical computing worker service 270A is not available forremote calls from a technical computing client 270. As such, theactivation daemons 740A-740N provide persistence and maintain the stateof the technical computing worker services 270A-270N.

The activation feature of technical computing worker services 270A-270Nsaves computing resources on workstations hosting the technicalcomputing worker, and also increases service reliability. For example,if the technical computing worker service 270A terminates abruptly, theactivation daemon 740A will automatically restart the next time a callis made to it. The activation daemon 740A-740N also provides for thegraceful termination of the technical computing worker service270A-270N. If an inactivate command is sent to a technical computingworker service 270A-270N, the technical computing worker service270A-270N can complete the processing of outstanding method calls beforeterminating. Alternatively, a command can be sent to the technicalcomputing worker 270A-270N to force immediate termination in the middleof processing a task. Additionally, in one embodiment, a technicalcomputing worker 270A can be configured and controlled to shutdown afterthe completion of processing of a task. If the technical computingworker 270A is not shutdown, it can be further configured to keep thestate of the technical computing environment, including any calculationor other workspace information, intact for the next task that may beprocessed.

In another embodiment of the technical computer worker service, thetechnical computing worker services 270A-270N can default to a non-debugmode when the technical computing worker service 270A-270N is started,either by the activation daemon 740A-740N or by other conventionalmeans. Alternatively, the activation daemon 740A-740N and/or thetechnical computing worker service 270A-270N can be configured to startin debug mode, giving access to command line interface of the technicalcomputing worker 270A-270N.

In a manner similar to technical computing worker services 270A-270N,the job managers 265A-265N and automatic task distribution mechanisms260A-260N as depicted in FIG. 7 can also be implemented as services. Assuch, the job managers 265A-265N and automatic task distributionmechanisms 260A-260N can support lookup registration and discovery sothat a technical computing client 250A can find the service withoutknowing the associated name of the service, the host name of the server160 running the service, or the port name the service is listening on.Additionally, the job manager 265A-265N and automatic task distributionmechanism services 260A-260N can be supported by activation daemons aswith the technical computing worker services 270A-270N.

In another aspect of the invention, the services of the technicalcomputing worker 270A-270N, job manager 265A-265N and the automatic taskdistribution mechanism 260A-260N, can also have administration functionsin addition to the operational functions discussed above. Administrationfunctions may include such functionality as determining the currentstatus of the service, or calling debug functions on the service, ormanually calling specific methods available from the service. Asdepicted in FIG. 7, the technical computing workers 270A-270N may eachinclude a technical computing worker administration software component740A-740B, the job managers 265A-265N may each include a job manageradministration software component 730A-730B, and the automatic taskdistribution mechanisms 260A-260N may also each include anadministration software component 760A-760N. Any and each of theseadministration software components may be part of the respectiveservice, or a separate software component, or another service in itself.Additionally, these administration software components may include agraphical user interface for easier administration of the service. Fromthe graphical user interface, a user may be able to exercise a portionor all of the functionality provided by the administration componentand/or the methods provided by the service. Any of these administrationfunctions may be not be available to users of the technical computingclient 250, and may be configured to only be available to systemadministrators or to those users with certain access rights to suchfunctionality.

For example, the administration component 760A of the automatic taskdistribution mechanism 260A may provide a graphical view showing thetasks and results currently in the automatic task distributionmechanism. It may further show the movement of tasks and results in andout of the automatic task distribution mechanism along with the sourceand destinations of such tasks and results. Additionally, the graphicaluser interface may allow the user to set any of the properties andexecute any of the methods described in the object-oriented interface tothe object exchange repository 664, or space, as described in the userdefined data classes below.

In another example, the job manager administration component 730A mayprovide a graphical view of all the jobs in the job queue 267 of the jobmanager 265. It may further show the status of the job and the state ofexecution of each of the tasks comprising the job. The graphical userinterface may allow the user to control the jobs by adding, modifying ordeleting jobs, or arranging the order of the job in the queue 267.Additionally, the graphical user interface may allow the user to set anyof the properties and execute any of the methods described in theobject-oriented interface to the job manager 266 as described in theuser defined data classes below.

A graphical user interface to the technical computing workeradministration component 750A-750N may provide a user the ability tochange the activation state, stop and start, or debug the technicalcomputing worker service 270A-270N. Additionally, the graphical userinterface may allow the user to set any of the properties and executeany of the methods described in the object-oriented interface to thetechnical computer worker 270A-270N as described in the user defineddata classes below.

Another aspect of this invention is the use of objects to performobject-oriented user interaction with the task and job managementfunctionality of the distributed system. FIG. 8A depicts one embodimentof using user defined data classes as part of the MATLAB® programminglanguage. In the object-oriented distributed system 800 embodiment ofthe present invention, the system 800 makes use of task objects 810,result objects 812, job objects 814 and jobresults objects 816 Theseobjects present a lower level user interaction mechanism to interactwith the task distribution functionality of the system 800.

In the object-oriented distributed system 800 of FIG. 8A, the technicalcomputing client 250 creates or declares a task object 810. The taskobject 810 is a user defined data class containing a MATLAB® command,input data and number of arguments. The technical computing client 250submits the task object, in the automated mode of operation, to theautomatic task distribution mechanism 260, which stores the task object810 in the object exchange repository 662. A technical computing worker270 listening and waiting for a task object 810 to appear in the objectexchange repository 662, takes the task object 810 to perform technicalcomputing of the task. The technical computing worker 270 obtains theMATLAB® command and arguments from the properties of the task object 810and performs technical computing on the task in accordance with thecommand. The technical computing worker 270 then creates or specifies aresult object 812, which is a user defined data object containing theoutput data resulting from the execution of a task represented by a taskobject 810. The technical computing worker 270 then writes the resultobject 812 to the object exchange repository 662. The technicalcomputing client 250 listens and waits for the appearance of the resultobject 812 in the object exchange repository 662. After the resultobject 812 appears in the object exchange repository, the technicalcomputing client 250 takes the result object 812 from the objectexchange repository and retrieves result information from the propertiesof the result object 812.

Referring still to FIG. 8A, in batch mode, the technical computingclient 250 creates or declares a job object 814, which is a user defineddata object containing an array of task objects 810. The technicalcomputing client 250 then submits the job object 814 to the job manager265 for processing. The job manager 265 then submits the one or moretask objects 820 defined in the job object 814 to the object exchangerepository 662 for processing by a technical computing worker 270. Thetechnical computing worker 270 listening for the appearance of the taskobjects 820, takes the task objects 820 and performs technical computingon the function as defined by each task object. The technical computingworker 270 then generates results and creates or specifies the resultobjects 822 representing the output generated for each function of eachof the task objects 820 of the job object 814. The technical computingworker 270 then writes the result objects 822 to the object exchangerepository 662. The job manager 662 listening for the appearance of theresult objects 822 takes the result objects from the object exchangerepository 662. The job manager 265 then creates or specifies thejobresults object 816, which in an object that provides an array ofresult objects 844 for each task object defined in a job object 814. Thejob manager then provides the jobresults object 816 to the technicalcomputing client 250. One ordinarily skilled in the art will recognizethe various combinations of uses of each of these objects in performingthe operation of the multiple modes of distribution as depicted in FIG.4.

In an embodiment of the invention as depicted in FIG. 8A and by way ofexample, the following functions and properties are available in theprogramming language of MATLAB® via toolbox functionality of MATLAB® fortask distribution management functionality:

Task Properties

Property Name Property Description TaskID unique task identifier JobIDnon-null if this task is part of a job FunctionNameAndParameters name offunction and parameters of function NumberOfOutputArguments number ofoutput arguments of function StartTime startTime

Methods

Method Name Method Description evaluate evaluates function and returnsResult

Result Properties

Property Name Property Description TaskID unique identifier given tocorresponding task object JobID non-null if this result is part of a jobOutputArguments output arguments StartTime start time EndTime end timeWorkerName name of work performing function ErrorMessage error message,if any

Worker Properties

Property Name Property Description Name assigned name of worker serviceMachineName name of computer worker service is running onTaskCompletedFcn called whenever the worker finishes a directlyevaluated task Admin instance of WorkerAdmin class

Methods

Method Name Method Description evaluateTask evaluate the functiondefined by instance of Task class getResult get instance of Result classgenerated by evaluatetask

WorkerAdmin Properties

Property Name Property Description Worker instance of Worker class

Methods

Method Name Method Description destroy removes all traces of the MATLABservice stop unregisters the service but maintains files on diskdeactivate stops the MATLAB process, but does not unregister serviceactivate starts the MATLAB process isActive returns true if the MATLABprocess is running isBusy returns true if MATLAB is processing task orotherwise busy isProcessingTask returns true if MATLAB is processingtask currentTask returns the task being processed if idle, returns nulldbstop basic debugging commands dbstep basic debugging commands dbcontbasic debugging commands break sends Ctrl-C isLogging returns true iflogging is turned on log L = 0 turns off logging L = 1 turns on logginggetStats output arg format (return argument contents not yet determined)clearResults makes uncollected results available for garbage collectionlisten listen to the space for the appearance of task objectsgetMachineProperties return a structure of machine specific information(system load, processor speed, amount of memory, number of processors,etc)

Space Properties

Property Name Property Description Name name of space MachineNme hostname of computer running the space RsultAvailableFcn name of function tocall SpaceAdmin returns an instance of the SpaceAdmin class

Methods

Method Name Method Description putTask the task will be written to thespace getTask a task will be taken from the space. This will block untila task is found. If passed a null, a task with any TaskID will bereturned. getTaskIfAvailable will return null if no task is immediatelyavailable putResult will place a result into the JavaSpace getResultworks the same as gettask, except a result will be taken rather than atask. getResultIfAvailable will return null if no result with thecorresponding TaskID is available

SpaceAdmin Properties

Property Name Property Description Space name of space

Methods

Method Name Method Description destroy destroy the space clearSpaceremoves all entries in this space cancelTask removes the task or resultmatching TaskID from the space numTasks returns the number of taskscurrently in the space numTesults returns the number of resultscurrently in the space workers list MATLAB workers listening to spaceclearWorkers unregister all listening workers addWorker add a MATLABworker as a listener removeWorker remove the given MATLAB workersetEvalAttempts set the number of times a task will be attemptedisLogging returns true if logging is turned on log L = 0 turns offlogging L = 1 turns on logging getStats output arg format (returnargument contents not yet determined getTasks removes and returns alltasks in the space in a cell array getResults removes and returns allresults in the space in a cell array readTasks non-destructively returnsall tasks in the space in a cell array readResults non-destructivelyreturns all results in a cell array

Job Properties

Property Name Property Description JobID unique identifier for this jobName name of job Tasks cell array of task objects UserName name of userwho creates job (user login name) JobCompletedFcn callback to executewhen this job is finished StartTime start time of job

Methods

Method Name Method Description addTask can add either a single task or acell array of tasks removeTask can remove either a single task or a cellarray of tasks

JobResults Properties

Property Name Property Description JobID unique identifier for job Namename of job Username name of user who created job Results cell array ofresult objects StartTime start time of job EndTime end time of job

JobManager Methods

Method Name Method Description submitJob submits a Job object to the jobmanager getResults returns a JobResults object. Will block until job isfinished getResultsIfAvailable returns a JobResults object or null. Willreturn immediately getResult gets a result of instance of a taskgetResultIfAvailable get a result of instance of a task if result isavailable

JobManagerAdmin Properties

Property Name Property Description JobManager instance of JobManagerclass Space the space associated with this job manager

Methods

Method Name Method Description clearJobs clears the job queue promotepromotes the specified job demote demotes the specified job promoteFirstpromote the job to the top of the queue demoteLast demote the job to thebottom of the queue cancelJob removes the job from the queue getStatusreturns ‘executing’,’completed’,’ getInfo gets information for allwaiting jobs except for the task objects readJobs non-destructivelyreturns all jobs in the queue

The following methods are generally available methods in a package ofthe MATLAB programming environment, which in this exemplary embodimenthave not been implemented as user defined data classes:

Package Scope Methods (Not Part of Any Class)

findWorkers finds MATLAB workers available on the network. Returns acell array of worker objects. findSpaces finds spaces available on thenetwork. Returns a cell array of space objects. findJobManagers findsjobmanagers available on the network. Returns a cell array of JobManagerobjects.The above package scope methods are used to find the services oftechnical computing workers 270A-270N, automatic task distributionmechanisms 260A-260N, or spaces, and job managers 265A-265N as depictedin FIG. 7. With these methods, a technical computing client 250 does notneed to have previous knowledge of any technical computing worker270A-270N, any of the automatic task distribution mechanisms 260A-260Nor any job managers 265A-265N. The technical computing client 250 canuse these methods to discover the name and number of such servicesavailable on the network 140.

In an embodiment of the present invention, the programming language ofMATLAB® may support the three modes of operation as described with FIGS.3A-3C. By way of example, the following program instructions show aprogramming usage of the above described user defined data classes foreach of these modes of operation:

Direct Distribution Usage Example

% Find worker w = distcomp.Worker(‘MachineName’) % Create task t =distcomp.Task({‘rand’,10},1); % (Optional) register completed callbackfor worker w.TaskCompletedFcn = ‘completedFcn’; % (Optional) set tasktimeout value t.Timeout = 10; % Send task to worker w.evaluateTask(t); %Get result (could take place inside completed callback function) r =w.getResult(t);

Automated Distribution Usage Example

% Find space s = distcomp.Space(‘spacename’) % Create task t =distcomp.Task({‘rand’,10},1) % (Optional) Register completed callbackfor space s.TaskCompletedFcn = ‘completedFcn’; % (Optional) set tasktimeout value t.timeout = 10; % Put task in space s.putTask(t); % Getresult from space (could be inside result listener) r = s.getResult(t);

Batch Processing Usage Example

% Find Job Manager jm = distcomp.JobManager(‘managername’) % Create jobj = distcomp.Job(‘username’,’jobname’) % (optional) register callbackfor job completion j.JobCompletedFcn = ‘callbackFcn’; % Add tasks to jobfor(i=1:10)    t = distcomp.Task({‘rand’,10},1);    % (optional)register completed callback for task    t.CompletedFcn = ‘callbackFcn’;   % (optional) set task timeout value    t.Timeout = 10;   j.addTask(t); end jm.submit(j) % Get results from job managerfor(i=1:10)    r = jm.getResult(j.Tasks {i});    % insert code toprocess result here end

In addition to the object-oriented interface to task and job managementfunctionality of the distributed system, the programming language ofMATLAB® may also support task distribution via high-level functionalprocedure calls. The MATLAB® programming language includes proceduralfunction calls such as eval( ) and feval( ) that provide a quick andpowerful procedure to execute functions. Also, the MATLAB® programmingenables you to write a series of MATLAB® statements into a file,referred to as an M-File, and then execute the statements in the filewith a single command. M-files can be scripts that simply execute aseries of MATLAB® statements, or they can be functions that also acceptinput arguments and produce output. Additionally, the MATLAB®programming language supports anonymous functions and function handles.Function handles are useful when you want to pass your function in acall to some other function when that function call will execute in adifferent workspace context than when it was created. Anonymousfunctions give you a quick means of creating simple functions withouthaving to create M-files each time and can be viewed as a special subsetof function handles. An anonymous function can be created either at theMATLAB® command line or in any M-file function or script. Anonymousfunctions also provide access to any MATLAB® function. The @ sign is theMATLAB® operator that constructs a function handle or an anonymousfunction, which gives you a means of invoking the function. Furthermore,the MATLAB® programming language enables the association of a callbackfunction with a specific event by setting the value of the appropriatecallback property. A variable name, function handle, cell array orstring can be specified as the value of the callback property. Thecallback properties for objects associated with the MATLAB®-baseddistributed computing application are designed to accept any of theabove described configurations as the value of the callback property,and may accept any other command, function or input parameter value thatare or may become available in the MATLAB® programming language. Thisallows users of the MATLAB® programming language to use the functioncalls they are familiar with, without learning the object-orientedmechanism, and take advantage of the distributed processing of tasksoffered by the MATLAB®-based distributed computing application of thepresent invention.

In the exemplary object-oriented distributed system 805 of FIG. 8B, thetechnical computing client 250 creates or declares a job object 860residing in the job manager 265. The job object comprises one or moretask objects 870A-870N. The job object 860 further defines propertiesassociated with the job, such as those job properties described infurther detail below. For example, a timeout property to specify thetime limit for completion of a job. Additionally, the minimum andmaximum number of technical computing workers to perform the tasks ofthe job can be set. The task object 870A-870N is an object that definesa function to be executed by a technical computing worker 270. Thefunction contains a MATLAB® command, input data and number of arguments.The task object 870A-870N defines additional task properties, such asthose defined below. For example, the task object 870A-870N may have astate property to indicate the current state of the task. Additionally,the technical computing client 250 may interface with the job manager265 through a job manager object 865 residing on the job manager 265. Ina similar manner to the job object 860 and task objects 870A-870N, thejob manager object 865 may have properties to define configuration andother details about the job manager 265 as described below. For example,the job manager object 865 may have a hostname property to indicate thename of the computer where a job queue exists, or a hostaddress propertyto indicate the internet protocol address of the computer. For any ofthe job manager object 865, job object 860 or task objects 870A-870N,the technical computing client may not instantiate a local object butmay just have a proxy or facade object to reference the object existingin the job manager 265.

Still referring to FIG. 8B, the technical computing client 250 submitsthe job to the job manager 265 via the job object 865. The job manager265 obtains each of the task objects 870A-870N from the job object 865.The job manager puts the job of the job object 860 into the job queue267. The job runner 667 obtains the one or more task objects 870A-870Nfrom the job object 860. The job runner 667 with the worker pool 668determines a technical computing worker 270 to process a task. The jobrunner 667 then submits a task, via a task object 870A-870N to anassigned technical computing worker 270. The technical computing worker270 obtains the function to execute from the properties of the taskobject 870A-870N and performs technical computing of the task inaccordance with the function. The technical computing worker 270 thenobtains the results of the function and updates one or more propertiesof the task object 870A-870N with information about the results. In thecase of any errors, the technical computing worker 270 may update anyerror properties of the task object 870A-870N. In a similar manner asthe technical computing client 250, the technical computing worker 270may use proxy or facade objects to interface with the job 860, jobmanager 865 or task 870A-870N objects residing in the job manager 265.The job manager 265 then updates the job object 860 with updated taskobjects 870A-870N containing the results of each task. The job manager265 may also update other properties of the job object 860, such asstart and finish times of the job, to reflect other information orstatus of the job. The job manager 265 then provides the updated jobobject 860 to the technical computing client 250. The technicalcomputing client 250 then can retrieve the results of each task from theupdated job object 860. One ordinarily skilled in the art will recognizethe various combinations of uses of the properties and functions ofthese objects in performing the operations described herein and insupport of any of the multiple modes of distribution as depicted in FIG.4.

In an exemplary embodiment of the invention as depicted in FIG. 8B andby way of example, the following functions and properties may beavailable in the programming language of MATLAB® for creating andhandling objects related to the task distribution and managementfunctionality of the present invention:

Function Reference

createJob

Purpose Create a job object Syntax obj = createJob(jobmanager) obj =createJob(. . . , ‘p1’, v1, ‘p2’, v2, . . . ) Arguments obj The jobobject. jobmanager The job manager object representing the job managerservice that will execute the job. p1, p2 Object properties configuredat object creation. v1, v2 Initial values for corresponding objectproperties. Description obj = createJob(jobmanager) creates a job objectat the specified remote location. In this case, future modifications tothe job object result in a remote call to the job manager. obj =createJob(. . . , ‘p1’, v1, ‘p2’, v2, . . . ) creates a job object withthe specified property values. If an invalid property name or propertyvalue is specified, the object will not be created. Note that theproperty value pairs can be in any format supported by the set function,i.e., param-value string pairs, structures, and param-value cell arraypairs. Example % construct a job object. jm =findResource(‘jobmanager’); obj = createJob(jm, ‘Name’, ‘testjob’); %add tasks to the job. for i=1:10 createTask(obj, ‘rand’, {10}); end %run the job. submit(obj); % retrieve job results. out =getAllOutputArguments(obj); % display the random matrix.disp(out{1}{1}); % destroy the job. destroy(obj);createTask

Purpose Create a new task in a job Syntax obj = createTask(j,functionhandle, numoutputargs, inputargs) obj = createTask( . . . ,‘p1’, v1, ‘p2’, v2, . . . ) Arguments j The job that the task object iscreated in. functionhandle A handle to the function that is called whenthe task is evaluated. numoutputargs The number of output arguments tobe returned from execution of the task function. inputargs A row cellarray specifying the input arguments to be passed to the functionfunctionhandle. Each element in the cell array will be passed as aseparate input argument. p1, p2 Task object properties configured atobject creation. v1, v2 Initial values for corresponding task objectproperties. Description obj = createTask(j, functionhandle,numoutputargs, inputargs) creates a new task object in job j, andreturns a reference, obj, to the added task object. obj = createTask( .. . , ‘p1’, v1, ‘p2’, v2, . . . ) adds a task object with the specifiedproperty values. If an invalid property name or property value isspecified, the object will not be created. Note that the property valuepairs can be in any format supported by the set function, i.e.,param-value string pairs, structures, and param-value cell array pairs.Example % create a job object. jm = findResource(‘jobmanager’); j =createJob(jm); % add a task object to be evaluated that generates a 10 ×10 random matrix. obj = createTask(j, @rand, {10,10}); % run the job.submit(j); % get the output from the task evaluation. taskoutput =get(obj, ‘OutputArguments’); % show the 10 × 10 random matrix.disp(taskoutput{1});destroy

Purpose Remove a job or task object from its parent and from memorySyntax Destroy(obj) Arguments obj  Job or task object deleted frommemory. Description destroy(obj) removes the job object reference ortask object reference obj from the local session, and removes the objectfrom the job manager memory. When obj is destroyed, it becomes aninvalid object. An invalid object should be removed from the workspacewith the clear command. If multiple references to an object exist in theworkspace, destroying one reference to that object invalidates theremaining references to it. These remaining references should be clearedfrom the workspace with the clear command. The task objects contained ina job will also be destroyed when a job object is destroyed. This meansthat any references to those task objects will also be invalid. If objis an array of job objects and one of the objects cannot be destroyed,the remaining objects in the array will be destroyed and a warning willbe returned. Remarks Because its data is lost when you destroy anobject, destroy should be used after output data has been retrieved froma job object. Example % destroy a job and its tasks. jm =findResource(‘jobmanager’); j = createJob(jm, ‘Name’, ‘myjob’); t =createTask(j, @rand, {10}); destroy(j); clear j Note that task t is alsodestroyed as part of job j.destroyAllTasks

Purpose Remove all of a job's tasks from the job object and from memorySyntax destroyAllTasks(obj) Arguments obj Job object whose tasks aredeleted. Description destroyAllTasks(obj) removes all tasks from the jobobject obj. The job itself remains, and you can add more tasks to it.(By comparison, using destroy on the job removes the job objectentirely.) findJob Purpose Find job objects stored in a job managerSyntax findJob(jm) out = findJob(jm) [pending queued running finished] =findJob(jm) out = findJob(jm, ‘p1’, v1, ‘p2’, v2, . . . ) Arguments jmJob manager object in which to find the job. pending Array of jobs injob manager jm whose State is pending. queued Array of jobs in jobmanager jm whose State is queud. running Array of jobs in job manager jmwhose State is running. finished Array of jobs in job manager jm whoseState is finished. out Array of jobs found in job manager jm. p1, p2 Jobobject properties to match. v1, v2 Values for corresponding objectproperties. Description findJob(jm) prints a list of all of the jobobjects stored in the job manager jm. Job objects will be categorized bytheir State property and job objects in the ‘queued’ state will bedisplayed in the order in which they are queued, with the next job toexecute at the top (first). out = findJob(jm) returns an array, out, ofall job objects stored in the job manager jm. Jobs in the array will beordered by State in the following order: ‘pending’, ‘queued’, ‘running’,‘finished’; within the ‘queued’ state, jobs are listed in the order inwhich they are queued. [pending queued running finished] = findJob(jq)returns arrays of all job objects stored in the job manager jm, bystate. Jobs in the array queued will be in the order in which they arequeued, with the job at queued(1) being the next to execute. out =findJob(jm, ‘p1’, v1, ‘p2’, v2, . . . ) returns an array, out, of jobobjects whose property names and property values match those passed asparameter-value pairs, p1, v1, p2, v2. Note that the property valuepairs can be in any format supported by the get function, i.e.,param-value string pairs, structures, and param-value cell arraypairs.If a structure is used, the structure field names are job objectproperty names and the field values are the requested property values.Jobs in the queued state are returned in the same order as they appearin the job queue service. When a property value is specified, it mustuse the same format that the get function returns. For example, if getreturns the Name property value as MyJob, then findJob will not findthat object while searching for a Name property value of myjob.findResource

Purpose Find available MATLAB ®-based application resources SyntaxfindResource(‘type’) out = findResource(‘type’) out =findResource(‘type’, ‘p1’, v1, ‘p2’, v2, . . . ) Arguments out Object orarray of objects returned. p1, p2 Object properties to match. v1, v2Values for corresponding object properties. DescriptionfindResource(‘type’) displays a list of all the available MATLAB ®-baseddistributed computing application resources of type given by the stringtype, that have the ability to run a job. Possible types include‘jobmanager’, localsession’, ‘mlworker’. out = findResource(‘type’)returns an array, out, containing objects representing all availableMATLAB ®-based distributed computing application resources of the giventype. out = findResource(‘type’, ‘p1’, v1, ‘p2’, v2, . . . ) returns anarray, out, of resources of the given type whose property names andproperty values match those passed as parameter-value pairs, p1, v1, p2,v2. Note that the property value pairs can be in any format supported bythe get function, i.e., param-value string pairs, structures, andparam-value cell array pairs. If a structure is used, the structurefield names are object property names and the field values are therequested property values. When a property value is specified, it mustuse the same format that the get function returns. For example, if getreturns the Name property value as MyJobManager, then findResource willnot find that object while searching for a Name property value ofmyjobmanager. Remarks The only supported types of resources isjobmanager. Note that some parameter- value pairs are queried on thelocal machine, while others require a call directly to the job managerto query. The parameter-value  pairs that require a call to the jobmanager will take longer to query than those ‘type’ Type of resource tofind that can be queried locally. The properties that are known locallyare: Type, Name, HostName, and Address. Note that it is permissible touse parameter-value string pairs, structures, and parameter-value cellarray pairs in the same call to findResource. Example jm1 =findResource(‘jobmanager’, ‘Name’, ‘jobmanager1name’); jm2 =findResource(‘jobmanager’, ‘Name’, ‘jobmanager2name’);findTask

Purpose Get the task objects belonging to a job object Syntax tasks =findTask(obj) tasks = findTask(obj, range) tasks = findTask(obj, ‘p1’,v1, ‘p2’, v2, . . . ) Arguments obj Job object. range A scalar or vectorlist of indexes specifying which tasks to return. tasks returned taskobjects. p1, p2 Task object properties to match. v1, v2 Values forcorresponding object properties. Description tasks = findTask(obj) andtasks = findTask(obj, range) get tasks belonging to a job object obj,where range is a scalar or vector list of indexes specifying which tasksto return. tasks = findTask(obj, ‘p1’, v1, ‘p2’, v2, . . . ) gets a 1 ×N array of task objects belonging to a job object obj. The returned taskobjects will be only those having the specified property-value pairs.Note that the property value pairs can be in any format supported by theget function, i.e., param-value string pairs, structures, andparam-value cell array pairs. If a structure is used, the structurefield names are object property names and the field values are therequested property values. When a property value is specified, it mustuse the same format that the get function returns. For example, if getreturns the Name property value as MyTask, then findTask will not findthat object while searching for a Name property value of mytask. RemarksIf obj is contained in a remote service, findTask will result in a callto the remote service. This could result in findTask taking a long timeto complete, depending on the number of tasks retrieved and the networkspeed. Also, if the remote service is no longer available, an error willbe thrown. If obj is contained in a remote service, you can issue a{circumflex over ( )}C (Control-C) while findTask is blocking. Thisreturns control to MATLAB. In this case, another remote call will benecessary to get the data. Example % create a job object. jm =findResource(‘jobmanager’); obj = createJob(jm); % add a task to the jobobject. createTask(obj, @rand, {10}) % assign to t the task we justadded to obj. t = findTask(obj, 1)getAllOutputArguments

Purpose Retrieve output arguments from evaluation of all tasks in a jobobject Syntax data = getAllOutputArguments(obj) Arguments obj Job objectwhose tasks generate output arguments. data Cell array of job results.Description data = getAllOutputArguments(obj) returns data, the outputdata contained in the tasks of a finished job. Each element of the 1 × Ncell array data contains the output arguments for the corresponding taskin the job, that is, each element is a cell array. If no output data isreturned for a task, then that element will contain an empty cell arrayas a placeholder. The order of the elements in data will be the same asthe order of the tasks contained in the job. Remarks BecausegetAllOutputArguments results in a call to a remote service, it couldtake a long time to complete, depending on the amount of data beingretrieved and the network speed. Also, if the remote service is nolonger available, an error will be thrown. You can issue a {circumflexover ( )}C (control-C) while getAllOutputArguments is blocking. Thisdoes not stop the data retrieval, but returns control to MATLAB. In thiscase, another remote call is necessary to get the data. Note thatissuing a call to getAllOutputArguments will not remove the output datafrom the location where it is stored. To remove the output data, use thedestroy function to remove either the task or its parent job object, oruse destroyAllTasks. Example jm = findResource(‘jobmanager’); j =createJob(jm, ‘Name’, ‘myjob’); t = createTask(j, @rand, {10});submit(j); data = getAllOutputArguments(t); % display a 10 × 10 randommatrix disp(data{1}); destroy(j);submit

Purpose Queue a job in a job queue service Syntax submit(obj) Argumentsobj  Job object to be queued. Description submit(obj) queues the jobobject, obj, in the resource where it currently resides. The resourcewhere a job queue resides is determined by how the job was created. Ajob may reside in the local MATLAB session, in a remote job managerservice, or in a remote MATLAB worker service. If submit is called withno output arguments, then it is called asynchronously, that is, the callto submit returns before the job is finished. An exception to this ruleis if the job resides in the local MATLAB session, in which case thesubmit always executes synchronously. Remarks When a job contained in ajob manager is submitted, the job's State property is set to queued, andthe job is added to the list of jobs waiting to be executed by the jobqueue service. The jobs in the waiting list will be executed in a firstin, first out manner, that is, the order in which they were submitted.Example % find a job manager service named jobmanager1. jm1 =findResource(‘jobmanager’, ‘Name’, ‘jobmanager1’); % create a jobobject. j1 = createJob(jm1); % add a task object to be evaluated for thejob. t1 = createTask(j1, @myfunction, {10, 10}); % queue the job objectin the job manager. submit(j1);

Property Reference Job Manager Object Properties

Property Name Property Description HostName Indicate name of the machinewhere a job queue exists HostAddress Indicate the IP address of the hostmachine where a job queue exists ID Indicate a job manager object'sidentifier JobCreatedFcn Specify the M file function to execute when ajob is created in a job queue JobFinishedFcn Specify the M file functionto execute when jobs finish in a job queue JobQueuedFcn Specify the Mfile function to execute when jobs are queued JobRunningFcn Specify theM file function to execute when job are run in a job queue Jobs Indicatethe jobs contained in a job manager Name Indicate the name of the jobmanager State Indicate the current state of the job manager

Job Object Properties

Property Name Property Description FinishedFcn Specify the callback toexecute when a job finishes running FinishTime Indicate when a jobfinished ID Indicate a job object's identifier MaximumNumberOfWorkersSpecify maximum number of workers to perform the tasks of a jobMinimumNumberOfWorkers Specify minimum number of workers to perform thetasks of a job Name Specify a name for a job object QueuedFcn Specify Mfile function to execute when job added to queue RestartWorker Specifywhether to restart MATLAB on a worker before it evaluates a taskRunningFcn Specify the M file function to execute when a job or taskstarts running StartTime Indicate when a job started running StateIndicate the current state of a job object TaskCreatedFcn Specify the Mfile function to execute when a task is created TaskFinishedFcn Specifythe M file function to execute when tasks finish in job queueTaskRunningFcn Specify M file function to execute when a task is runTasks Indicate the tasks contained in a job object Timeout Specify timelimit for completion of a job

Task Object Properties

Property Name Property Description CaptureCommandWindowOutput Specifywhether to return command window output CommandWindowOutput Indicatetext produced by execution of task object's function ErrorID Indicatetask error identifier ErrorMessage Indicate output message from taskerror FinishedFcn Specify the callback to execute when a task finishesrunning FinishTime Indicate when a task finished Function Indicate thefunction called when evaluating a task ID Indicate a task object'sidentifier InputArguments Indicate the input arguments to the taskobject NumberOfOutputArguments Indicate the number of arguments returnedby the task function OutputArguments The data returned from theexecution of the task RunningFcn Specify the M file function to executewhen a job or task starts running State Indicate the current state of atask object StartTime Indicate when a task started running TimeoutSpecify time limit for completion of a task

In alternative embodiments, the object-oriented interfaces and/orfunctional procedures available in the MATLAB® programming language, maybe available in one or more application programming interfaces, and maybe available in one or more libraries, software components, scriptinglanguages or other forms of software allowing for the operation of suchobject-oriented interfaces and functional procedures. One ordinarilyskilled in the art will appreciate the various alternative embodimentsof the above class definitions, class method and properties, packagescope methods, functional procedures and programming instructions thatmay be applied to manage the distribution of tasks and jobs fordistributed technical computing processing of the present invention.

From an overall perspective and in view of the structure, functions andoperation of MATLAB® as described herein, the current invention presentsmany advantages for distributed, streaming and parallel technicalcomputing processing systems as depicted in FIGS. 9A and 9B. TheMATLAB®-based distributed computing system can handle a wide variety ofuser configurations from a standalone system to a network of twomachines to a network of hundreds of machines, and from a small taskgranularity to an extremely large task granularity of parallel, andparallel and serial technical computing.

Referring to FIG. 9A, the distributed system 910 supports the delegationof tasks from a technical computing client 250 to remote technicalcomputing workers 270A-270N leveraging the processing capability of eachof the workstations 170A-170N hosting each of the technical computingworkers 270A-270N. The tasks are executed independently of each otherand do not require the technical computing workers 270A-270B tocommunicate with each other.

Still referring to FIG. 9A, the streaming, or serial, processing system910 allows serial processing to occur via multiple technical computingworkers 270A-270N on multiple workstations 170A-170N. A technicalcomputing client 250A submits a job requiring a task to be processedserially from technical computing worker 270A to technical computingworker 270B then to technical computing worker 270N. When technicalcomputing worker 270A completes its technical computing of the task,technical computing worker 270A submits the task to technical computingworker 270B for further processing. In a similar fashion, the task canbe submitted to additional technical computing workers 270N for furtherprocessing until the task is complete in accordance with its taskdefinition. The last technical computing worker 270N to performtechnical computing on the task submits the result to the technicalcomputing client 250.

The streaming processing system 920 can take advantage of specificworkstations 170A-170N that may have faster processors for performingprocessor intensive portions of technical computing of the task or takeadvantage of technical computing workers 270A-270N with access tospecific data sets or external control instrumentation as required forcomputation of the task.

In FIG. 9B, a parallel system 930 is depicted which combines thedistributed and streaming configuration of the systems (900 and 910) inFIG. 9A. In brief overview, technical computing workers 270A and 270Band 270N can be executing a set of tasks independently of each other.Additionally, these technical computing workers can then submit tasks toother technical computing workers to perform technical computing of atask in a streaming fashion. For example, technical computing worker270A can submit a task for further processing to technical computingworker 270B, and in turn, technical computing worker 270B can submit thetask for further processing by technical computing worker 270N. Thetechnical computing worker 270N when it completes processing may returna result back to the automatic task distribution mechanism 260 or thetechnical computing client 250. This configuration provides for greatflexibility in determining how to best distribute technical computingtasks for processing based on many factors such as the types andavailability of computing devices, network topology, and the nature andcomplexity of the technical computing problem being solved.

B. Instrument-Based Distributed Computing System

The illustrative embodiment of the present invention provides aninstrument-based distributed computing system using the technicalcomputing client and the technical computing worker. Theinstrument-based distributed computing system includes one or moreinstruments connected through a network. The instruments may be providedon a PC-based platform or other platform and have capacities to runadditional software product, such as the technical computing client andthe technical computing worker. The instrument-based distributedcomputing system may operate in a test environment for testing a unitunder test. One of ordinary skill in the art will appreciate that theinstrument is illustrative test equipment and the present invention mayapply to other test equipment or components, such as a virtualinstrument that includes an industry-standard computer or workstationequipped with application software, hardware such as plug-in boards, anddriver software, which together perform the functions of traditionalinstruments.

In the instrument-based distributed computing system, the technicalcomputing client may reside in an instrument or a client device tocreate a job. The technical computing client then distributes the job toone or more remote technical compute workers for the distributedexecution of the job. The technical computing workers may reside inother instruments or workstations on a network. The workers running onthe instruments and/or workstations are available to the technicalcomputing client so that the technical computing client can distributethe job to the workstations and the instruments. The technical computingworkers execute the received portion of the job and return the executionresults to the technical computing client. As such, the illustrative ofthe present invention executes a job or a test in a distributed fashionusing the instruments and/or workstations on the network.

FIG. 10 is a block diagram showing an exemplary instrument-baseddistributed system 1000 in the distributed computing environment. Theinstrument-based distributed computing system 1000 may include one ormore clients 150, servers 160, workstations 170 and instruments 180coupled to a network 140. The client 150, server 160 and workstation mayrun the technical computing client 250, the automatic distributionmechanism 260 and the technical computing worker, respectively, asdescribed above with reference to FIGS. 1A-9B. The instrument 180 mayrun the technical computing client 250 and/or the technical computingworker depending on the configuration of the instrument baseddistributed computing system, which will be described below in moredetail with reference to FIGS. 12A-12C. Those skilled in the art willappreciate that the instrument-based distributed system 1000 isillustrative and may not include all of the client 150, server 160,workstation 170 and instrument 180. The instrument-based distributedsystem 1000 can be implemented with a various combinations of the client150, server 160, workstation 170 and instrument 180 in otherembodiments.

In the illustrative embodiment of FIG. 10, the client 150, server 160,workstation 170 and instrument 180 are coupled to the network 140. Theclient 150 or instrument 180 may communicate directly with theworkstation 170 or other instruments 180 as described above withreference to FIG. 3A. The client 150 or instrument 180 may communicatewith the workstation 170 or other instruments 180 via the server 160,which runs the automatic task distribution mechanism 260, as describedabove with reference to FIGS. 3B-4. The workstations 170 or instruments180 may or may not communicate with each other depending on thecommunication topology of the distributed computing system 1000, asdescribed above with reference to FIGS. 9A and 9B.

FIG. 11 is a block diagram showing an exemplary instrument utilized inthe illustrative embodiment of the present invention. The instrument 180may include instrumentation functionalities 1110, a technical computingclient 250, a technical computing worker 270, an operating system 1120and a network interface 118. The instrumentation functionalities 1110provide the instrument's own functionalities for test, measurement andautomation, such as the functionalities for oscilloscopes and spectrumanalyzers, that determine the present value of a quantity underobservation. In the illustrative embodiment, the instrument 180 refersto any tool that includes one or more instrumentation functionalities.

The technical computing client 250 and the technical computing worker270 installed on the instrument 180 may include the MATLAB®-baseddistributed computing application 120 as described above with referenceto FIGS. 2A-2C. The technical computing client 250 creates a jobincluding one or more tasks. The technical computing client 250distributes the job to the technical computing workers for thedistributed execution of the job. The technical computing worker 270performs technical computing tasks defined by the client 250. Theinstrument 180 may include the technical computing client 250 and/or thetechnical computing worker 270. If the instrument 180 is installed withthe technical computing client 250, the instrument 110 may operate togenerate a job and distribute the job to workstations 170 and/or otherinstruments 180, as the client 150 does. If the instrument 180 isinstalled with the technical computing worker 270, the instrument 110may operate to receive and execute the tasks, as the workstations 170do.

The instrument 180 may include an operating system 1130 that enablesusers to install their own applications, such as the technical computingclient 250 and the technical computing worker 270. The operating system1130 enables the applications to run on the instrument 180. Theinstrument 180 may have, for example, a standard Windows® operatingsystem so that the users can install their own applications on theinstrument 180. The Windows operating system is an exemplary operatingsystem that can be included in the instrument 180 and the operatingsystem 1130 may include any other operating systems described above withreference to FIG. 1A.

The instrument 180 may communicate with the client 150, server 160,workstation 170 or other instruments 180 via the network interface 118.The network interface 1130 may include any network interfaces describedabove with reference to FIG. 1A. The network interface 118 may include abus interface, such as a general purpose interface bus (GPIB) interface.The network interface 1140 may also include any other bus interfaces,such as Universal Serial Bus (USB), Myrinet, Peripheral ComponentInterconnect (PCI), PCI extended (PCI-X), etc. In particular, thenetwork interface 1140 may include an LXI (LAN extension forinstrumentation) interface, which is based on industry standard Ethernettechnology.

The instrument 180 running the workers may have the capability ofaccelerating the execution of tasks. For example, the instrument mayinclude hardware components, such as FPGA (Field Programmable GateArray), ASIC (Application Specific Integrated Circuit), DSP (DigitalSignal Processor) and CPU (Central Processing Unit), to perform fastcalculations of the tasks, such as FFT calculations. In particular, theinstrument 180 may have multiple processors or CPUs to run the workers.

The instrument 180 may support a GPGPU (General-purpose Computing onGraphics Processing Units) process that uses the GPU (GraphicsProcessing Units) to perform the computations rather than the CPU. GPUis the mocroprocessor of a graphics card or graphics accelerator) for acomputer or game console. GPU is efficient at manipulating anddisplayingcomputer graphics, and its parallel structure makes the GPUmore effective than typical CPU for a range of complex algorithms. TheGPU can also be used for general purposes in non-graphics areas, such ascryptography, databased operations, FFT, neural networks. One of skillin the art will appreciate that the workstations running the workers maysupport the GPGPU process.

FIG. 12A is a block diagram showing another exemplary instrument-baseddistributed computing system. The instrument-based distributed computingsystem may include the client 150, workstations 170 and instruments 180coupled to the network 140. The technical computing client 250 runs onthe client 150. The technical computing the technical computing workers270 may run on the workstations 170 and instruments 180. The technicalcomputing client 250 creates a job and distributes the job to thetechnical computing workers 270 on the workstations 170 and instruments180. The technical computing workers 270 on the workstations 170 andinstruments 180 execute the job and return the execution results to thetechnical computing client 250 on the client 150. One of ordinary skillin the art will appreciate that the system may include a server for theautomatic distribution of the tasks, as described above with referenceto FIG. 10.

FIG. 12B is a block diagram showing another exemplary instrument-baseddistributed computing system. The instrument-based distributed computingsystem may include workstations 170 and instruments 180 coupled to thenetwork 140. The technical computing client 250 runs on the instrument180. The technical computing workers 270 run on the workstations 170 andother instruments 180. The technical computing client 250 creates a joband distributes the job to the technical computing workers 270 on theworkstations 150 and instruments 180. The technical computing workers270 on the workstations 170 and instruments 180 execute the job andreturn the execution results to the technical computing client on theclient 150. One of ordinary skill in the art will appreciate that thesystem may include a server for the automatic distribution of the tasks,as described above with reference to FIG. 10.

FIG. 12C is a block diagram showing an exemplary hierarchical structureof the instrument-based distributed computing system. Theinstrument-based distributed computing system may include the client150, workstation 170 and instrument 180 coupled to the network 140. Thesystem may also include a sub-cluster 190 coupled to the network 140.The sub-cluster 190 may include clients, servers, workstations andinstruments. The sub-cluster 190 may run additional technical computingclients and technical computing workers to distribute and execute thejob defined by the technical computing client 250 on the client 150 orinstrument 180. The technical computing client 250 may create a job anddistribute the job to the sub-cluster 190. The technical computingworkers in the sub-cluster 190 execute the job and return the executionresults to the technical computing client 250 on the client 150 orinstrument 180. The sub-cluster 190 may include a distribution mechanismfor distributing the job to the workstations and instruments in thesub-cluster 190.

The instrument-based distributed computing system can be used in a testenvironment in the illustrative embodiment. The instrument that containsa computing capability, such as the technical computing client 250 andthe technical computing worker 270, can perform a test. The computingcapability of the instrument is used for processing data to perform aportion of the test defined by a client. The test environment utilizesthe computing power of the instrument on a network to conduct adistributed execution of the test. In the description of theillustrative embodiment, a “test” refers to an action or group ofactions that are performed on one or more units under test to verifytheir parameters and characteristics. The unit under test refers to anentity that can be tested which may range from a single component to acomplete system. The unit under test may include software product and/orhardware devices.

FIG. 13 is an example of a test environment 1200 provided in theillustrative embodiment of the present invention. In the testenvironment 1200, various types of resources 1210 may be used forproviding units under test 1230. One of skill in the art will appreciatethat the resources 1210 may include software tools and hardware tools.The test environment 1200 may include a test manager 1220. Using thetest manager 1220, users may input control data 1240 for settingconditions for testing the units under test 1230 in the test environment1200. The control data 1240 may include a sequence of test steps thatspecifies the ordering of the resources to be used by the test manager1220. The users may also input the variables and parameters of the testthat can be used as arguments to call the functions provided by theresources 1210. Using different variables and parameters in the test,the functions of the units under test 1230 may return different values.The units under test 1230 may include one or more pieces of hardware,software and/or programs, such as models and/or code. One of skill inthe art will appreciate that the units under test 1230 may includesoftware tools and hardware tools. The test manager 1220 conducts thetest in different conditions using the sequence of the test steps andthe variables and parameters of the test.

The illustrative embodiment of the present invention may provide a testenvironment in which the users (or developers) of software tools areable to conduct a test for testing various types of units under test1230. The test may include one or more test steps, such as a test stepfor testing a textual program, a test step for testing a graphicalprogram, a test step for testing a function provided in a software tool,a test step for testing a hardware device, etc. As an example, the testincludes a MATLAB® step in which MATLAB® expressions can be executed.The MATLAB® step communicates with MATLAB® installed locally or in aremote computational device to run the expression and returns the resultto the test manager 120. The test steps may also include a Simulink®step to interact with models, and an Instrument Control (one of MATLAB®Toolboxes) step to interact with external hardware. Furthermore, aStatistics Toolbox (one of MATLAB® Toolboxes) step may providestatistical analysis for data procured by other steps. The test steps inthe test include discrete actions that are executed during the executionof the test. The test step and test step properties may be deemed a Javafunction call that generates M-code, and the function call arguments,respectively.

FIG. 14 is a flow chart showing an exemplary operation for distributinga test in the illustrative embodiment of the present invention. Theclient 150 defines a test for testing units under test (step 1302). Thetest may be defined to include one or more test steps. Each test stepmay test different units under test. The client 150 then submits atleast a portion of the test (step 1304) to an instrument 180 orworkstation 170 that contains the technical computing worker 270. Forexample, the client 150 then submits each test step to differentworkstations 170 and/or instruments 180. The technical computing worker270 receives at least a portion of the test (step 1306) and performs therequested technical computing as defined by the test (step 1308). Inperforming the technical computing on the test, an associated result maybe generated (step 1310). In alternative embodiments, either no resultis generated, or no result is required to be returned to the client 150.After generating the result from computing the test, the workstations170 and/or instruments 180 provide the result (step 1312) to the client150, and the client 150 obtains the result from the workstations 170and/or instruments 180 (step 1314). One of ordinary skill in the artwill appreciate that the distributing operation is illustrative and thetest may be distributed by the operations described above with referenceto FIGS. 5B-5D. One of ordinary skill in the art will also appreciatethat the distribution of the test may be performed in the same way asdescribed above with reference to FIGS. 6A-9B.

One of ordinary skill in the art will appreciate that the instrument 180may be used as a technical computing client and/or worker and as aninstrumentation tool. In one illustrative embodiment, the instrument 180may be used as an instrumentation tool performing part of the test thatacts on the information collected by the instrument 180. In anotherembodiment, the instrument 180 may be used as a pure technical computingclient or worker utilizing the technical computing functionality of theinstrument 180. In still another embodiment, the instrument 180 may beused as both a technical computing client/worker and an instrumentationtool. In this embodiment, the instrument 180 is used as a traditionalinstrumentation tool when it is needed to make a measurement, and alsoused as a technical computing client/worker when it is needed to computeat least a portion of the test.

In some embodiments, if the instrument 180 is used as both a technicalcomputing client/worker and an instrumentation tool, the technicalcomputing functionality and the instrumentation functionality of theinstrument 180 may need to be compromised depending on the capability ofthe instrument 180 to support for both of the functionalitiesconcurrently. One exemplary way to compromise these functionalities isto pause/stop the technical computing functionality when the instrument180 is needed to make a measurement. When the measurement is completed,the instrument 180 can continue to perform the technical computingfunctionality. One of ordinary skill in the art will appreciate thatthis is an exemplary way to compromise the functionalities and thefunctionalities can be compromised in other ways in differentembodiments. The technical computing capability of the instrument 180can allow users to utilize the additional computational power in theinstrument 180 to perform a fast result calculation of a test in thetest environment.

Furthermore, the illustrative embodiment provides for technicalprogramming language constructs to develop program instructions of thejobs and tests to be executed in parallel in multiple technicalcomputing workers. These technical programming language constructs havebuilt-in keywords of the programming language reserved for theirfunctionality. One of these constructs is a distributed array elementfor technical computing operations executing across multiple technicalcomputing workers. The technical programming language of the paralleltechnical computing worker of MATLAB® provides reserved key words andbuilt-in language statements to support distributed arrays to check thecurrent process id of the worker.

In order to provide distributed arrays in a technical computingprogramming language, an iterator is decomposed into separate iteratorsfor each node or worker that will be processing the distributed array.Each worker is identified by a process id or pid between 1 and the totalnumber of pids, or nproc. For each pid of a worker out of a totalnumbers of pids, a portion of the distributed array may be processedseparately and independently. For example, take the following iterators:

-   -   var=start:fin    -   or    -   var=start:delta:fin ; where start is the first iteration, fin is        the last iteration and delta is the step increments between the        first iteration and the last iteration.        In order to process a portion of the distributed array, an        iterator such as the following needs to be decomposed from the        standard iterators described above:    -   var=start(pid):delta:fin(pid); where start is the first        iteration for the pid, fin is the last iteration for the pid,        and delta is the step increments between the first iteration and        last iteration for the pid.        In an exemplary embodiment, an iterator is decomposed into nproc        continuous sections of equal or nearly equal iteration lengths.        The following is an example algorithm described in the        programming language of MATLAB® for determining equal or nearly        equal iteration lengths across multiple workers:    -   function [startp,finp]=djays(start,delta,fin,pid,nprocs)    -   ratio=floor((fin-start)/delta+1)/nprocs;    -   startp=start+ceil((pid−1)*ratio)*delta;    -   finp=start+(ceil(pid*ratio)−1)*delta;        For example, with nproc=4 workers, the iterator j=1:10 is        decomposed to the following:    -   j=1:3 on pid=1    -   j=4:5 on pid=2    -   j=6:8 on pid=3    -   j=9:10 on pid=4

In alterative embodiments, other algorithms can be used to determine thedecomposition of iterators and the length of iterators to be applied perpid for processing distributed arrays across multiple workers. Forexample, the decomposition of the iterator may be determined byestimated processing times for each of the pids for its respectiveportion of the iterator. Or it may be determined by which workers 270are not currently executing a program or which workers 270 are idle orhave not previously executed a program. In another example, only twopids may be used for the iteration although several pids may beavailable. In yet another example, each iterator may be assigned to aspecific worker. In other cases, the decomposition of the iterator canbe based on one or more operational characteristics of the worker, or ofthe computing device 102 running the worker. One ordinarily skilled inthe art will appreciate the various permutations and combinations thatcan occur in decomposing an iterator to process portions of adistributed array in multiple workers.

In the parallel technical computing environment of MATLAB®, distributedarrays are denoted with the new keyword darray and in case ofdistributed random arrays, the new keyword drand. Various alternativenames for these keywords, or reserved words could be applied. Askeywords or reserved words of the programming language of the paralleltechnical computing environment, they have special meaning as determinedby the worker and therefore are built into the language. As such, thesekeywords are not available as variable or function names.

Distributed arrays are distributed by applying the decompositionalgorithm to the last dimension of the array. For example, a1000-by-1000 array is distributed across 10 processors, or workers, bystoring the first 100 columns on the first worker, the second 100columns on the second worker and so forth. The content of a distributedarray on a particular worker is the local portion of the array. Forexample, if A is a distributed array, then A.loc refers to the portionof A on each worker. For example, with nproc=16, the statement

A=drand(1024,1024) % create a distributed random array becomes

A=darray(1024,1024)

A.loc=rand(1000,64)

Different random submatrices, or arrays, are generated on each one ofthe sixteen (16) workers. In another embodiment and for the case of adistributed array representing RGB color coding for images withdimensions of m-by-n-by-3, the decomposition and the distribution of thearray occurs along the second dimension so that each worker has a fullcolor strip form the overall image to work on in its local portion.Although the distribution of the distributed array is discussed in termsof column based distribution, various alternative methods can be used todistribute portions of the distributed array among multiple workers. Forexample, the distributed array can be distributed by rows or a portionof rows and columns. In another example, a portion could be distributedbased on a subset of the data having all dimensions of the array. Anytype of arbitrary mapping can be applied to map a portion of thedistributed array to each of the workers. As such, one ordinarilyskilled in the art will recognize the various permutation ofdistributing portions of a distributed array to each worker.

In another aspect, a distributed array may be cached. That is, an workermay store its portion of the distributed array, e.g., A.loc, but priorto performing operations on the local portion, the worker may still haveread access to the other portions of the distributed array. For example,a first worker may be assigned column 1 of a three column distributedarray with other two workers assigned columns 2 and 3. The first Workermay have read access to columns 2 and 3 prior to performing operationson column 1 of the array, i.e., read and write access. However, once thefirst worker performs an operation on its local portion of thedistributed array, it may no longer have any access to the otherportions of the distributed array. For example, once the first workerperforms an operation on column 1, it no longer will have read access tocolumns 2 and 3 of the distributed array.

For basic element-wise operations like array addition, each worker mayperform the operation on its local portion, e.g., A.loc. Nocommunication between the workers is necessary for the processing of thelocal portion of the distributed array. More complicated operations,such as matrix transpose, matrix multiplication, and various matrixdecompositions, may require communications between the workers. Thesecommunications can follow a paradigm that iterates over the workers:

for p = 1:nprocs  if p == pid   processor p is in charge of this step  send data to other processors     do local computation   maybe receivedata from other processors  else   receive data from p   do localcomputation   maybe send data back to p  end endIn the above example, the number of communication messages betweenworkers is proportional to the number of workers, and not the size ofthe distributed array. As such, as arrays get larger the overhead forsending messages to coordinate the array computation becomesproportionately smaller to the array data and the resulting computationtime on each worker.

In one aspect, the present invention relates to methods forprogrammatically providing for distributed array processing as depictedin FIG. 15. In the flow diagram of FIG. 15, method 1500 depicts theprocessing of a distributed array in execution in multiple workers. Atstep 1502, a worker is executing a program flow of a program (job ortest) invoked for execution. At some point during the program flow, theworker 270 at step 1504 interprets a distributed array construct in aprogram statement, such as a program statement comprising the keyworddarray. At step 506, the worker 270 evaluates the distributed arrayconstruct to determine the portion of the distributed array to storelocally. As discussed above, the distributed array may be decomposed ina variety of ways. For example, the worker 270 may store a specificcolumn of the array to perform local processing. After determining andstoring the portion of the distributed array, the worker 270 may performan operation on this portion of the array. For example, it may performbasic array operations such as addition. After handling the distributedarray statement, the program flow continues to other program statementsof the program. In another embodiment, prior to performing an operationon the local portion of the array, the worker 270 may access or obtaindata values of other portions of the array that have been cached.Although method 1500 is discussed with regards to one worker, the sameflow diagram will apply to multiple workers 270 running the same programso that at steps 1504, 1506 and 1508 the worker interpreting thedistributed array determines what portion of the array to store andprocess locally.

Many alterations and modifications may be made by those having ordinaryskill in the art without departing from the spirit and scope of theinvention. Therefore, it must be expressly understood that theillustrated embodiments have been shown only for the purposes of exampleand should not be taken as limiting the invention, which is defined bythe following claims. These claims are to be read as including what theyset forth literally and also those equivalent elements which areinsubstantially different, even though not identical in other respectsto what is shown and described in the above illustrations.

1. A method for executing a technical computing job in a distributedfashion in an instrument-based distributed computing system, the methodcomprising: providing, using a technical computing client, a technicalcomputing job, the technical computing client being a first instrument;distributing the technical computing job to a plurality of technicalcomputing workers, the plurality of technical computing workersincluding a first technical computing worker and a second technicalcomputing worker, the distributing comprising: sending a first portionof the technical computing job to the first technical computing workerfor execution, and sending a second portion of the technical computingjob to the second technical computing worker for execution; andreceiving a first execution result from the first technical computingworker and a second execution result from the second technical computingworker.
 2. The method of claim 1, wherein at least one of the pluralityof technical computing workers is a second instrument.
 3. The method ofclaim 2, wherein the second instrument has a technical computingfunctionality and an instrumentation functionality for making ameasurement.
 4. The method of claim 2, wherein the second instrumentcomprises test equipment and the technical computing job comprises atest for testing a unit under test.
 5. The method of claim 4, whereinthe test equipment accelerates execution of a measurement, analysis,verification or validation of the test.
 6. The method of claim 4,wherein the test includes one or more test steps for testing a textualprogram, a graphical program a function provided in a software tool, ora hardware device.
 7. The method of claim 1, wherein the firstinstrument includes technical computing functionality and aninstrumentation functionality for making a measurement.
 8. The method ofclaim 1, further comprising: providing a local area network interfacefor the first instrument, the local area network interface allowing thefirst instrument to communicate with the plurality of technicalcomputing workers over the local area network.
 9. The method of claim 1,wherein the distributing comprises: sending the first portion of thetechnical computing job to the first technical computing worker using adistributed array, and sending the second portion of the technicalcomputing job to the second technical computing using the distributedarray.
 10. The method of claim 9, wherein the first technical computingworker or the second technical computing worker performs an operation onthe portion of the distributed array.
 11. The method of claim 1, whereinthe second instrument performs technical computations using a graphicsprocessing unit (GPU).
 12. A method for executing a technical computingjob in a distributed fashion in an instrument-based distributedcomputing system, the method comprising: receiving, using a technicalcomputing worker, a portion of a technical computing job, the technicalcomputing worker being a first instrument; executing the receivedportion of the technical computing job, the executing generating anexecution result; and sending the execution result to a technicalcomputing client.
 13. The method of claim 12, wherein the firstinstrument has a technical computing functionality and aninstrumentation functionality for making a measurement.
 14. The methodof claim 12, further comprising: providing a local area networkinterface for the first instrument, the local area network interfaceallowing the first instrument to communicate with the technicalcomputing client over the local area network.
 15. The method of claim12, wherein the first instrument performs technical computations forexecuting the received portion of the technical computing job using agraphics processing unit (GPU).
 16. The method of claim 12, wherein thetechnical computing client is a second instrument.
 17. The method ofclaim 16, wherein the second instrument has a technical computingfunctionality and an instrumentation functionality for making ameasurement.
 18. The method of claim 12, wherein the first instrumentcomprises test equipment and the technical computing job comprises atest for testing a unit under test.
 19. The method of claim 18, whereinthe test equipment accelerates execution of a measurement, analysis,verification or validation of the test.
 20. The method of claim 18,wherein the test includes one or more test steps for testing a textualprogram, a graphical program a function provided in a software tool or ahardware device.
 21. A non-transitory storage medium storinginstructions executable in an electronic instrument for executing atechnical computing job in a distributed fashion in an instrument-baseddistributed computing system, the medium storing one or moreinstructions for: providing, using a technical computing client, atechnical computing job, the technical computing client being a firstinstrument; distributing the technical computing job to a plurality oftechnical computing workers, the plurality of technical computingworkers including a first technical computing worker and a secondtechnical computing worker, the distributing comprising: sending a firstportion of the technical computing job to the first technical computingworker for execution, and sending a second portion of the technicalcomputing job to the second technical computing worker for execution;and receiving a first execution result from the first technicalcomputing worker and a second execution result from the second technicalcomputing worker.
 22. The non-transitory medium of claim 21, wherein atleast one of the plurality of technical computing workers is a secondinstrument.
 23. The non-transitory medium of claim 22, wherein thesecond instrument has a technical computing functionality and aninstrumentation functionality for making a measurement.
 24. Thenon-transitory medium of claim 22, wherein the second instrumentcomprises test equipment and the technical computing job comprises atest for testing a unit under test.
 25. The non-transitory medium ofclaim 24, wherein the test equipment accelerates a measurement,analysis, verification or validation of the test.
 26. The non-transitorymedium of claim 24, wherein the test includes one or more test steps fortesting a textual program, a graphical program a function provided in asoftware tool or a hardware device.
 27. The non-transitory medium ofclaim 21, wherein the first instrument has a technical computingfunctionality and an instrumentation functionality for making ameasurement.
 28. The non-transitory medium of claim 21, further storingone or more instructions for: providing a local area network interfacefor the first instrument, the local area network interface allowing thefirst instrument to communicate with the plurality of technicalcomputing workers over the local area network.
 29. The non-transitorymedium of claim 21, wherein the one or more instructions of distributingcomprises one or more instructions for: sending the first portion of thetechnical computing job to the first technical computing worker using adistributed array, and sending the second portion of the technicalcomputing job to the second technical computing worker using thedistributed array.
 30. The non-transitory medium of claim 29, whereinthe first technical computing worker or the second technical computingworker performs an operation on the portion of the distributed array.31. The non-transitory medium of claim 21, wherein the second instrumentperforms technical computations using a graphics processing unit (GPU).32. A non-transitory storage medium storing instructions executable inan electronic instrument for executing a technical computing job in adistributed fashion in an instrument-based distributed computing system,the medium storing one or more instructions for: receiving, using atechnical computing worker, a portion of a technical computing job, thetechnical computing worker being a first instrument; executing thereceived portion of the technical computing job, the executinggenerating an execution result; and sending the execution result to atechnical computing client.
 33. The non-transitory medium of claim 32,wherein the first instrument has a technical computing functionality andan instrumentation functionality for making a measurement.
 34. Thenon-transitory medium of claim 32, further storing one or moreinstructions for: providing a local area network interface for the firstinstrument, the local area network interface allowing the firstinstrument to communicate with the technical computing client over thelocal area network.
 35. The non-transitory medium of claim 32 whereinthe first instrument performs technical computations for executing thereceived portion of the technical computing job using a graphicsprocessing unit (GPU).
 36. The non-transitory medium of claim 32,wherein the technical computing client is a second instrument.
 37. Thenon-transitory medium of claim 36, wherein the second instrument has atechnical computing functionality and an instrumentation functionalityfor making a measurement.
 38. The non-transitory medium of claim 32,wherein the first instrument comprises test equipment and the technicalcomputing job comprises a test for testing a unit under test.
 39. Thenon-transitory medium of claim 38, wherein the test equipmentaccelerates a measurement, analysis, verification or validation of thetest.
 40. The non-transitory medium of claim 38, wherein the testincludes one or more test steps for testing a textual program, agraphical program a function provided in a software tool or a hardwaredevice.
 41. An instrument for executing at least a portion of atechnical computing job in a distributed fashion, the instrumentcomprising: a processor for: receiving at least a portion of thetechnical computing job from a technical computing client, executing thereceived portion of the technical computing job, the executinggenerating an execution result, and sending the execution result to thetechnical computing client over a network.
 42. An instrument forprocessing a technical computing job in a distributed fashion, theinstrument comprising: a processor for: providing the technicalcomputing job, sending a first portion of the technical computing job toa first technical computing worker for execution, sending a secondportion of the technical computing job to a second technical computingworker for execution; and receiving a first execution result from thefirst technical computing worker and a second execution result from thesecond technical computing worker.